I know that alot has been written on this subject already, but I want to make sure I understand it and I want to ask you all if you’ve got another solution.
I want to use a panda for accurate time keeping using a Stopwatch kind of implementation. I’ve got an application where time keeping is critical but for short amounts of times. So it does not have to be precise over 24 hours but just for 3 minutes. The minimum accurary i require is about 10 ms) So i need to know two things:
1.Accurate time keeping over a period of time. (This can be done with the onboard RTC)
2.Allowing for a periodical update of the display with the time.
For step two there are a couple of different solutions as far as i’ve found out:
1.Using an expanded timer/Timer
I don’t what the base is that the Timer Expanded Timer class have so i cannot make a statement how precise these are. But because of what I read on other topics/online i think that because FEZ is not real time this method of timing isn’t very precise.
I’ve read that it CAN be done this way, but i’ve got a device that has to do a lot of things in a short period of time. So it would be nice if the generation of the tick event isn’t a responibility (and cannot be influenced by) the FEZ CPU.
2.Using a while(true) loop
It would work because it would continually check the Datetime.Now (or system time) but the same problem arise as with the first solution.
3.Using an external component as a timer (arduino/555) in combination with an interrupt port.
This would be an ideal solution for my problem but only if the handling of the interupts wouldn’t be affected (in a large way) by a busy CPU. Also i dont know the mimimum time required for a port to be switched from high to low.
4.Using an external component as a timer (arduino/555) in combination with a port in a while(true) loop.
The problem with this is that though the timing pulse is accurate it would be influenced by GC etc when reading it. And as far as i remember from school (i’ve got some experience using PIC/ATMEL) an interupt is always better than doing some ‘busy waiting’.
So my question to you all is: Is the above true and also are there any other solutions I didn’t think of? Also my understanding of programming is a lot better than electronics but I think i will manage. I’ve been working as a .Net developer for about three years and this is my first MF experience.