Following some recommendations I've now ordered a 16F887 and a cool LED display thing, and plan to see if I can get the former to drive the latter. I've designed a font which I can encode into 5 bytes per character, and plan to store 40 characters (A-Z, 0-9 plus some punctuation). Hence I need 200 bytes.
The 16F887 has plenty of space for this but how do you access the higher RAM locations? Let's take as an example Bank 2's RAM located at address 0x120. Bank 2 starts at 0x100, so is this then right...
Note: I'm not really going to do it like that! I'll use indirect addressing, it's the only practical way.
Thanks,
ahydra
The 16F887 has plenty of space for this but how do you access the higher RAM locations? Let's take as an example Bank 2's RAM located at address 0x120. Bank 2 starts at 0x100, so is this then right...
Code:
cblock 0x20 ; 0x120 - 0x100
c0:5
c1:5
c2:5
...
c15:5
endc
; switch to bank 2
BSF STATUS, RP1
BCF STATUS, RP0
; load c2 into W
MOVF c2, 0
Note: I'm not really going to do it like that! I'll use indirect addressing, it's the only practical way.
Thanks,
ahydra
Last edited: