In SX Microcontrollers, SX/B Compiler and SX-Key Tool, thosey wrote: Okay, since an encoder can go faster than the speed of a complete scan of a program taking into account all the long loops and so on you are able to use an interrupt so that you do not miss a pulse count. Think of this as a subroutine that can be set up either on a time base or an event base like a pin is triggered high. If your encoder is very slow updating and the programm runs faster than the encoder you might not need to do this with an interrupt. Example a 15 cpr encoder that turn over every 15seconds might not need an interrupt. Since the program should be able to handle this. But wouldn't you like to go into an interrupt routine every time a new pulse occurs. This way you make sure that you handle all of your counts from the encoder. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=170488#m170504 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)