In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Clint, You really only need an interrupt on one of the encoder signals, and only on rising OR falling edge. Let's say you have it on phase-A rising. In the interrupt you can simple sample phase-B to see if it is high or low. If it's high your moving in one direction, if low your moving in the other direction. Now that doesn't allow you to monitor all four states, but normally you don't need to. If you NEED to monitor both falling and rising edge, you can use two pins. Setup one for rising edge, and the other for falling edge. Or you could switch edge detects inside the interrupt routine. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=170488#m170528 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)