On Sat, 14 Sep 2002, Magnus von Rosen wrote: >The state-machine approach seems like a good alternative, although I >have to think through the tabls a bit, I haven't done that before. >Scary, since I have (recently) a master's in software engineering... Ah, now you say that. You can move the larger part of the state machine into a timer ISR (and drop the delay() part). Then you can steer it from your main code by setting flags. Atomic flags ;-) >Since this is becoming a too big exercise for my puny brain, I think C >is the language to use... You can do it in assembly too but C is easier to maintain imho. If there is no stringent need to save space or speed go with C. Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads