In SX Microcontrollers, SX/B Compiler and SX-Key Tool, g_daubach wrote: MadMax, would be a bit easier if we knew a bit more about your timing requirements, i.e. what is the shortest pulse length, and the shortest pulse period to be handled correctly? As Samuel suggested, having the ISR set flags according to vertain events is a good idea to pass over such information from the ISR to the main program. This way, the ISR gets fired up asynchronously on certain input events, and (similar to a D-FlipFlop) saves the events in flags. The main loop needs to check the flags periodically, and often enough to not miss two subsequent pulses, and finally reset the flag(s), like resetting the D-FlipFlop. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=103601#m103832 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)