Don't apologize Bill, All of us understand that the free stuff comes with no warranty. I saw some new code and decided to test it. I was working on a similar app so I was inerested. I had the complex code working anyways :-) Maybe your code and my testing would benefit someone. I'll modify the code and will post the results tomorrow. Regards, Chetan On 1/18/06, Bill & Pookie wrote: > > Found the problem from your data. I have the bits of the byte numbered in > reverse. Where I do a "BTFSS ADLOW,00" it should be bit 07 instead of 00. > Bit 1 should be 06....and bit 7 is 00. And the same for all the bit tests > of ADHIGH. > > I did do some limited testing on the program and thought it worked. For the > fully untested code, I apologize.. > > The problem became apparent by looking for what hex values resulted in a > display with 10 or 5 in it. hex 1F is 19.3, so it has both 10 and 5. hex > 3E just has 5, hex 5D just has 10. > > 0001 1111 10 5 > 0011 1110 5 > 0101 1101 10 > > xxxx xxx1 bits only on when 10 > xxxx xx1x bits only on when 5 > > So it looks like I am testing low order bit when should be testing high > order bit.. > > Bill -- Chetan Bhargava Web: http://www.bhargavaz.net Blog: http://microz.blogspot.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist