# 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

#### Nigel Goodwin

##### Super Moderator
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!.

#### blueroomelectronics

##### Well-Known Member
It's just a warning. You can turn it off.

#### facemanfacey

##### New Member
thanks, its been a while since i cranked up the old picstart!

i feel a little silly now

thomas

#### blueroomelectronics

##### Well-Known Member
The 16F88 is a nice PIC. If you plan on sticking with asm the 18F1320 is nicer IMO.

Status
Not open for further replies.