This is the code I am using to set my ports accordingly... but when I build the project, it gives me this error:  "Register in operand not in bank 0.  Ensure that bank bits are correct."

reffering to the lines where TRISA, TRISB, TRISC, and TRISD are being set.

....I know it's not in bank 0... I told it to me in bank 1... why isn't it listening?

bsf            STATUS,RP0 ; select bank 1
clrf            TRISA ; All port A is output
movlw        b'11110010' ; Set required keypad inputs
movwf        TRISB
clrf             TRISC ; All port C is output
clrf            TRISD ; All port D is output

bcf             STATUS,RP0 ; select bank 0

Views: 94

Reply to This

Replies to This Discussion

If it says Message[302] or something like that in front of it, it's not actually an error. It's just warning you politely that the TRIS registers aren't in bank0 and you should make sure before weird stuff happens when you run the program.

RSS

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service