Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

port initialise problems - so simple yet so irritating

Status
Not open for further replies.

facemanfacey

New Member
hi again... :rolleyes:

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
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top