Error 302: "Register in operand not in bank 0" ?
I am using MPLAB IDE v7.40 with MPLAB ICD2 to program a 16F690 chip in a PICkit2 board. I am getting on error, in many places, on most applications. The error is always the same.
I am assembling the lesson programs and getting this message. It's not an error because it does create the HEX file but the program does not run properly.
"MessageREVERSIBLE.ASM 52: Register in operand not in bank 0. Ensure that bank bits are correct"
This reversible.asm and other programs are not modified and are assembled just as they were on the MicroChip site. What is the reason for this error?
What is the solution? I have put an arrow
pointing to each line in the code below where this message is produced
bsf STATUS,RP0 ; select Register Page 1
movwf TRISA ; Make PortA all input ; <---- MESSAGE 302
clrf TRISC ; Make PortC all output ; <---- MESSAGE 302
movlw 0x10 ; A2D Clock Fosc/8
movwf ADCON1 ; <---- MESSAGE 302
; bcf STATUS,RP0 ; back to Register Page 0
bcf STATUS,RP0 ; address Register Page 2
movlw 0xF7 ; we want all Port A pins Analog, except RA3
movwf ANSEL ; <---- MESSAGE 302
bcf STATUS,RP0 ; address Register Page 0
The program simply displays a rotating blinking light. When you press the button, the lights are supposed to reverse direction. I can assemble this program and program the 16F690 and the lights do rotate. However, they do not reverse. I suspect it has something to do with this message that is the source of the problem but don't understand why this message is produced.
post edited by ipscone - 2006/09/19 06:57:29