On Thu, Sep 19, 2013 at 12:44 PM, Jesse Frey <jmf...@alaska.edu> wrote:
> When I need to read a timer asynchronously do three consecutive reads and do
> a bitwize majority function on them.

Not to take this thread too far off-topic, but that approach doesn't
work. For example, say your middle reading happens to catch the timer
just as it is rolling over from 0xffff to 0x0000. Your three readings
would then be:

0xffff
0xff00 /* meta-stable transition state */
0x0000

Your bit-wise majority function would return 0xff00, which is still
wrong. Since the whole point of taking multiple readings is to avoid
these meta-stable transition states, a bit-wise majority isn't good
enough. You need to compare whole values until you see two that match.

-William

------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to