??? 10/23/06 20:23 Modified: 10/23/06 20:32 Read: times |
#126921 - the Dallas parts do that Responding to: ???'s previous message |
and they do it without a specific instruction. You load the SFR's appropriately and a read will inc one DPTR and a write inc's the other. This happens with no performance penalty, BTW.
ID1 Increment/Decrement Select for DPTR1. Bit 7 on DPTR1 when selected (SEL = 1) 0 = INC DPTR increments DPTR1 (default) 1 = INC DPTR decrements DPTR1 ID0 Increment/Decrement Select for DPTR. Bit 6 on DPTR when selected (SEL = 0) as 0 = INC DPTR increments DPTR (default) 1 = INC DPTR decrements DPTR TSL Toggle Select. When clear (= 0), DPTR- Bit 5 the SEL bit is toggled following execution INC DPTR MOV DPTR, #data16 MOVC A, @A+DPTR MOVX A, @DPTR MOVX @DPTR, A AID Autoincrement/Decrement Enable. Bit 4 or decremented (as determined by DPTR-related instructions: MOVC A, @A+DPTR MOVX A, @DPTR MOVX @DPTR, A Bits 3, 2, 1 Reserved. These bits read 010b. 7 6 5 4 SFR 86h ID1 ID0 TSL AID RW-0 RW-0 RW-0 R-0 R = Unrestricted read, W = Unrestricted write, -n = Value after reset Data Pointer Select (DPS) RE |