i'm new in microcontroller, and i'm using PIC16F84A. Can somebody please tell me what's wrong with my program, i just wish to set portA and portB as output and illuminate LED which will be connected to the ports.
#INCLUDE P16F84A.INC
__config _XT_OSC & _CP_OFF & _PWRTE_OFF & _WDT_OFF
MOVLW 0x00
BSF STATUS, RP0
MOVWF TRISA
MOVWF TRISB
BCF STATUS, RP0
MOVLW 0xFF
MOVWF PORTA
MOVWF PORTB
end
here's the error:
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\Admin\Desktop\Group8\blinkingLED.mcp' started.
Fri Jul 17 19:33:37 2009
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "blinkingLED.asm" /l"blinkingLED.lst" /e"blinkingLED.err" /o"blinkingLED.o"
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 6 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 7 : Executable code and data must be defined in an appropriate section
Message[302] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 8 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 8 : Executable code and data must be defined in an appropriate section
Message[302] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 9 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 9 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 10 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 11 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 13 : Executable code and data must be defined in an appropriate section
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\Admin\Desktop\Group8\blinkingLED.mcp' failed.
Fri Jul 17 19:33:38 2009
----------------------------------------------------------------------
BUILD FAILED
#INCLUDE P16F84A.INC
__config _XT_OSC & _CP_OFF & _PWRTE_OFF & _WDT_OFF
MOVLW 0x00
BSF STATUS, RP0
MOVWF TRISA
MOVWF TRISB
BCF STATUS, RP0
MOVLW 0xFF
MOVWF PORTA
MOVWF PORTB
end
here's the error:
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\Admin\Desktop\Group8\blinkingLED.mcp' started.
Fri Jul 17 19:33:37 2009
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "blinkingLED.asm" /l"blinkingLED.lst" /e"blinkingLED.err" /o"blinkingLED.o"
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 6 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 7 : Executable code and data must be defined in an appropriate section
Message[302] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 8 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 8 : Executable code and data must be defined in an appropriate section
Message[302] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 9 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 9 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 10 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 11 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152] C:\DOCUMENTS AND SETTINGS\ADMIN\DESKTOP\GROUP8\BLINKINGLED.ASM 13 : Executable code and data must be defined in an appropriate section
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `C:\Documents and Settings\Admin\Desktop\Group8\blinkingLED.mcp' failed.
Fri Jul 17 19:33:38 2009
----------------------------------------------------------------------
BUILD FAILED