What is the wrong in assembly code for 16f84a?

Thread Starter

Nec

Joined Nov 21, 2008
6
Hi everyone, my problem is that I write a assembly program for 16f84a but this program is not work there is no transition from bank0 to bank1.I write a simple program to see problem easily but same thing happened again.

---simple program---
PORTA EQU 0x05
PORTB EQU 0x06
TRISA EQU 0x85
TRISB EQU 0x86
STATUS EQU 0x03
ORG 0x00

CLRF PORTA
CLRF PORTB
BSF STATUS,5
MOVLW 0x00
MOVWF TRISA
BCF STATUS,5

MOVLW 0x03
MOVWF PORTA

END

-------------------------


Normally, move from bank0 to bank1 and program all pins of porta as output and return to bank0 and then it makes second and first pins of porta high output.Right but it does not happen, it gives an error message "Register in operand not in bank 0. Ensure that bank bits are correct." for trisa(I use mplab 8.10).I couldnot see the mistake in the code :S someone can help me.Thanks
 
Top