Hello,
I need help to make a Proteus simulation of a 16 LED shift, but it won't let me build the programming. Shows me errors in code.
I'm using the PIC 18F4550
first time using this program and using the PIC
LIST P=18F4550
INCLUDE <PIC18F4550.INC>
;************************************************************
CONFIG FOSC = HS
CONFIG PWRT = ON
CONFIG BOR = OFF
CONFIG WDT = OFF
CONFIG MCLRE = ON
CONFIG PBADEN = OFF
CONFIG LVP = OFF
CONFIG DEBUG = OFF
CONFIG XINST = OFF
; CODE ******************************************************
#define Conta 0x12
cblock
Conta1
Conta2
Conta3
Sweep
endc
#define Time1 0x00
#define Time2 0x85
#define Time3 0x02
ORG 0x00
INICIO
clrt PORTB
clrt PORTC
clrt PORTD
clrt TRISA
movlw 0x01
movwf TRISB
movwf TRISC
movwf TRISD
btfss PORTA, 0
goto INICIO
movlw B'00000001'
movwf Sweep
MOVERIGTH
call Retardo
rrncf Sweep, F
movff Sweep, PORTB
btfss PORTA, 0
bra MOVERIGTH
bra MOVELEFT
MOVELEFTH
call Retardo
rlncf Sweep, F
movff Sweep, PORTB
btfss PORTA, 0
; btfsc PORTA, 0
bra MOVELEFT
bra MOVERIGTH
Retardo
movlw Time1
movwf Conta1
movlw Time2
movwf Conta2
movlw Time3
movwf Conta3
Repeat
decfsz Conta1, F
bra Repeat
movlw Time1
movwf Conta1
decfsz Conta2, F
bra Repeat
decfsz Conta3
bra Repeat
Return
END
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/guill/OneDrive/Documents/DIG_3/led_shift/Auto.X'
make -f nbproject/Makefile-default.mk dist/default/production/Auto.X.production.hex
make[2]: Entering directory 'C:/Users/guill/OneDrive/Documents/DIG_3/led_shift/Auto.X'
"C:\Program Files\Microchip\xc8\v2.20\bin\xc8-cc.exe" -c -mcpu=18F4550 -mdfp="C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/PIC18Fxxxx_DFP/1.2.26"/xc8 -fno-short-double -fno-short-float -memi=wordwrite -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-download -mdefault-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto:auto -o build/default/production/Auto.o Auto.asm
Auto.asm:1:: error: (223) digit out of range
Auto.asm:1:: error: (876) syntax error
Auto.asm:2:: error: (844) lexical error
Auto.asm:16:: error: (876) syntax error
Auto.asm:29:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:30:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:31:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:32:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:34:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:36:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:38:: error: (876) syntax error
Auto.asm:40:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:42:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:49:: error: (876) syntax error
Auto.asm:51:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:53:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:55:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:56:: error: (876) syntax error
Auto.asm:57:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:61:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:62:: warning: (1522) RAM access bit operand not specified, assuming banked memory
Auto.asm:65:: warning: (1522) RAM access bit operand not specified, assuming banked memory
:69:: warning: (1311) missing configuration setting for config word 0x300000; using default
:69:: warning: (1311) missing configuration setting for config word 0x300008; using default
:69:: warning: (1311) missing configuration setting for config word 0x300009; using default
:69:: warning: (1311) missing configuration setting for config word 0x30000A; using default
:69:: warning: (1311) missing configuration setting for config word 0x30000B; using default
:69:: warning: (1311) missing configuration setting for config word 0x30000C; using default
:69:: warning: (1311) missing configuration setting for config word 0x30000D; using default
Auto.asm:29:: error: (800) undefined symbol "PORTB"
Auto.asm:30:: error: (800) undefined symbol "PORTD"
Auto.asm:31:: error: (800) undefined symbol "TRISB"
Auto.asm:32:: error: (800) undefined symbol "TRISD"
Auto.asm:33:: error: (800) undefined symbol "Retardo"
Auto.asm:34:: error: (800) undefined symbol "Sweep"
Auto.asm:51:: error: (800) undefined symbol "Conta1"
Auto.asm:53:: error: (800) undefined symbol "Conta2"
Auto.asm:55:: error: (800) undefined symbol "Conta3"
Auto.asm:44:: error: (1223) relative branch/call offset out of range
Auto.asm:46:: error: (1223) relative branch/call offset out of range
Auto.asm:58:: error: (1223) relative branch/call offset out of range
Auto.asm:63:: error: (1223) relative branch/call offset out of range
Auto.asm:66:: advisory: (1) too many errors (21)
(908) exit status = 1
make[2]: Leaving directory 'C:/Users/guill/OneDrive/Documents/DIG_3/led_shift/Auto.X'
make[1]: Leaving directory 'C:/Users/guill/OneDrive/Documents/DIG_3/led_shift/Auto.X'
make[2]: *** [nbproject/Makefile-default.mk:116: build/default/production/Auto.o] Error 1
make[1]: *** [nbproject/Makefile-default.mk:91: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
Thank you for the time to check my mistake