On Wed, 4 Feb 1998 16:44:48 -0800 David Sprenkle writes: >I have seen two solutions to this question. My question is there a >reason to >avoid > >INCFSZ counter1,F >INCF counter2, F This doesn't work "correctly", because the increment of counter2 is done only if counter1 is *not* 0 (The PIC17CXX has a "increment and skip if not 0" instruction that is ideal for this situation, but the 16CXX only has the option to skip if zero). So the count in counter2 is not incremented every 256 counts as would be desired. This is the 2-cycle counter I referred to earlier. It is possible to convert the count to a proper 16-bit number by subtracting counter2 from counter1, and using this value as the high byte. The value of counter1 is of course the correct low byte, since it was incremented every time the routine executed just like a conventional counter does. Further theory of the technique was discussed some time ago. I think the routine was originally proposed by one of the "heavy hitters" maybe Payson or Dattalo, but I could be mistaken. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]