Happy Xmas All, Just for once, not a problem mail! I've recently been using Bourns' new ACE-128 rotary encoders. (For those of you who haven't meet them, info is on my web page shown below) These give out a type of 'grey-code' to give the position of the encoder. Bourns say to just use a 256 byte look-up table, but as that can be upto 1/2 a PIC's memory, I've writen decoder routines that are shorter (at the expense of speed). In case anybody else out there is using these beasties, I stuck 4 of the routines on my web page. For further info, or to see the routines, the web page is:- http://ourworld.compuserve.com/homepages/steve_lawther/bourns.htm If anybody uses any of the routines, and / or improves on the code size, for the speed specified, could they let me know - I've spent the best part of a week trying to optimise them, but I isn't perfect! Hope this helps somebody, Steve Lawther PS - I'm not in any way linked with Bourns, and the ACE-128 is not a solution to the world problems - but it has its uses! *** Opinions are my own, not my employers, nor clients *** *** For More PIC stuff, see *** http://ourworld.compuserve.com/homepages/steve_lawther/ucindex.htm