list P=16f54
#include <p16f54.inc>
; CONFIG
; __config 0xFFFB
__CONFIG _OSC_RC & _WDT_OFF & _CP_OFF
org 1FFH
GOTO Start ; go to beginning of program
org 0
Init clrf PORTA ;reset ports
clrf PORTB
movlw b'00000000' ;set port-a I/O
movwf TRISA
movlw b'00000000' ;set port-b I/O
movwf TRISB
retlw 0
Start
call Init
Main
bsf PORTA, 0
GOTO Main ; loop forever
End
Symbol not previously defined (TRISA)
49 Views Asked by Michael Walker At
1
Check the datasheet of your target device:
PIC16F54 | Microchip Technology
According to this datasheet, PIC16F54 doesn't have TRIS registers in the register file.
Instead of general instructions like
MOVWF, you should use the specialTRISinstruction to setTRISregisters in PIC16F54.