abc1122
Newbie level 4
16f84a programming
hie,
Im very new to PIC programming. Have no basic knowledge at all. Am currently doing a final year project.
Below are part of my code:
PORTA equ 05h
TRISA equ 85h
PORTB equ 06h
TRISB equ 86h
org 0 ;reset vector to origin 0
bsf STATUS,5 ;go to BANK 1
movlw PORT_RA ;set RA2 and RA3 as input
movwf TRISA ;move 04h to TRISA
movlw PORT_RB ;set all RB ports as output
movwf TRISB ;move to TRISB
bcf STATUS,5 ;back to BANK 0
there are 2 error in the BOLD.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 101 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 103 : Register in operand not in bank 0. Ensure that bank bits are correct.
can somebody help me? Thanks
hie,
Im very new to PIC programming. Have no basic knowledge at all. Am currently doing a final year project.
Below are part of my code:
PORTA equ 05h
TRISA equ 85h
PORTB equ 06h
TRISB equ 86h
org 0 ;reset vector to origin 0
bsf STATUS,5 ;go to BANK 1
movlw PORT_RA ;set RA2 and RA3 as input
movwf TRISA ;move 04h to TRISA
movlw PORT_RB ;set all RB ports as output
movwf TRISB ;move to TRISB
bcf STATUS,5 ;back to BANK 0
there are 2 error in the BOLD.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 101 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROJECTS\16F84ATMPO.ASM 103 : Register in operand not in bank 0. Ensure that bank bits are correct.
can somebody help me? Thanks