port initialise problems - so simple yet so irritating

Status
Not open for further replies.

facemanfacey

New Member
hi again...

i'm having a problem initialising my ports with the following code on the 16F88, and all i seem to get is this error message;

Register in operand not in bank 0. Ensure that bank bits are correct.

when i am SURE i have selected bank 1 where those particular registers are located.

Code:
START

INITIALIZE_PORTS

	BCF 	STATUS,RP1			; select bank 1
	BSF 	STATUS,RP0
	MOVLW	B'00000101'			; setting up PORTA
	MOVWF 	TRISA
	MOVLW	B'00100000'			; setting up PORTB
	MOVWF 	TRISB
	MOVLW 	D'39'				; 31250 baud rate
	MOVWF 	SPBRG 				
	MOVLW 	B'00000100'			; set up high speed BRGH and disable tx pin
	MOVWF 	TXSTA
	MOVLW	B'10010000'			; set up asynchronous reception
	MOVWF	RCSTA

thanks for your help on this confusing matter.

thomas
 
hi again...

i'm having a problem initialising my ports with the following code on the 16F88, and all i seem to get is this error message;

Register in operand not in bank 0. Ensure that bank bits are correct.

Read CAREFULLY what it says - where does it say it's an ERROR message?.

It's not!.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…