Ayne
New Member
My code
These errors
I am new to PIC programming in assembly
i am learning from Nigel Goodwin's tutorials but i have PIC 16F877A
I have some questions
Q NO:1- Why these errors???
Q NO:2- It is necessary to add "P16F877A.INC" file in ur "***.mcp" window under the header button???
Q NO:3- It is necessary to add "16f877a.lkr" file in ur "***.mcp" window under the linker scripts button??
Q NO:4- Is the both files("P16F877A.INC"..."16f877a.lkr") should be in our working directory???
Thanks
Code:
;***************************************************************************************************
Processor 16F877A
include <P16F877A.INC>
__config _HS_OSC & _WDT_OFF & _PWRTE_ON
;***************************************************************************************************
; VARIABLE STORAGE
cblock 0x20 ;Start of gernal purpose Register
BSF STATUS, RP0 ;Select Bank 1
BCF STATUS, RP1
MOVLW B'00000000' ;Set PortB All output
MOVWF TRISB
BCF STATUS, RP0 ;Select Bank 0
;**************************************************************************************************
; PROGRAM CODE
START
MOVLW B'10101010'
MOVWF PORTB
NOP
MOVLW B'01010101'
MOVWF PORTB
NOP
End
These errors
Code:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877A "Led.asm" /l"Led.lst" /e"Led.err" /o"Led.o"
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 14 : Illegal label (BSF STATUS)
Error[115] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 14 : Duplicate label ("RP0" or redefining symbol that cannot be redefined)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 15 : Illegal label (BCF STATUS)
Error[115] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 15 : Duplicate label ("RP1" or redefining symbol that cannot be redefined)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 16 : Illegal label (MOVLW B'00000000')
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 17 : Illegal label (MOVWF TRISB)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 18 : Illegal label (BCF STATUS)
Error[115] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 18 : Duplicate label ("RP0" or redefining symbol that cannot be redefined)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 24 : Illegal label (MOVLW B'10101010')
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 25 : Illegal label (MOVWF PORTB)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 26 : Illegal label (NOP)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 27 : Illegal label (MOVLW B'01010101')
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 28 : Illegal label (MOVWF PORTB)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 29 : Illegal label (NOP)
Error[121] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 31 : Illegal label (End)
Error[129] E:\PROJECTS\PIC\LED FLASHING\LED.ASM 32 : Expected (END)
Halting build on first failure as requested.
BUILD FAILED: Fri Dec 22 23:59:52 2006
I am new to PIC programming in assembly
i am learning from Nigel Goodwin's tutorials but i have PIC 16F877A
I have some questions
Q NO:1- Why these errors???
Q NO:2- It is necessary to add "P16F877A.INC" file in ur "***.mcp" window under the header button???
Q NO:3- It is necessary to add "16f877a.lkr" file in ur "***.mcp" window under the linker scripts button??
Q NO:4- Is the both files("P16F877A.INC"..."16f877a.lkr") should be in our working directory???
Thanks
Attachments
Last edited: