Searching \ for 'multiprecision down counting' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/timers.htm?key=count
Search entire site for: 'multiprecision down counting'.

Truncated match.
PICList Thread
'multiprecision down counting'
1995\01\02@004822 by crocontroller discussion list

flavicon
face
So here's what I thought was a clever trick:

On the PIC the DECF instruction doesn't reset carry on underflow so
implementing multiprecision down counters requires using the zero
state. This code will count down a 16 bit value in 4 cycles (16 clocks)

       MOVF    COUNT_LO_BYTE,F         ; Test this byte
       BTFSC   ZERO_BIT                ; (bit 2, f3)
       DECF    COUNT_HI_BYTE           ; Decrement the high byte
       DECF    COUNT_LO_BYTE           ; Decrement the low byte

--Chuck

More... (looser matching)
- Last day of these posts
- In 1995 , 1996 only
- Today
- New search...