'multiprecision down counting'
crocontroller discussion list
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
More... (looser matching)
- Last day of these posts
- In 1995
, 1996 only
- New search...