i'm new to microcontroller, i'm using MPLAB to implement a program that enables me to flash a LED using push button, and after four presses, another led is eternally switched on. this is the code with the output:
THE CODE:
the OUTPUT:
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "led flash.asm" /l"led flash.lst" /e"led flash.err" /d__DEBUG=1
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 3 : Found directive in column 1. (__CONFIG)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 5 : Found directive in column 1. (CBLOCK)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 8 : Found directive in column 1. (ENDC)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 12 : Found directive in column 1. (org)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Found opcode in column 1. (bsf)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Overwriting previous address contents (0000)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Overwriting previous address contents (0000)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Found opcode in column 1. (movlw)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Overwriting previous address contents (0001)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Overwriting previous address contents (0001)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 15 : Found opcode in column 1. (movwf)
Message[302] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 15 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 16 : Found opcode in column 1. (movlw)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 17 : Found opcode in column 1. (movwf)
Message[302] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 17 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 18 : Found opcode in column 1. (bcf)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 21 : Found opcode in column 1. (bcf)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 24 : Found opcode in column 1. (btfsc)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 25 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 27 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 30 : Found opcode in column 1. (decfsz)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 31 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 33 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 36 : Found opcode in column 1. (bsf)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 38 : Found directive in column 1. (end)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Users\GIG\Desktop\lab\led flash\led flash.mcp' failed.
Language tool versions: MPASMWIN.exe v5.50, mplink.exe v4.48, mplib.exe v4.48
Preprocessor symbol `__DEBUG' is defined.
Sun Jun 01 12:08:31 2014
----------------------------------------------------------------------
BUILD FAILED
THE CODE:
Rich (BB code):
#include <p16F84a.inc>
__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _HS_OSC
CBLOCK 0x0c
counter
ENDC
movlw 0x04
movwf counter
org 0x00
bsf STATUS, RP0
movlw 0x01
movwf TRISB
movlw 0x00
movwf TRISA
bcf STATUS, RP0
Start
bcf PORTA, 0
push
btfsc PORTB,0
goto count
goto push
count
decfsz counter, f
goto push
goto second_led
second_led
bsf PORTA, 0
end
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "led flash.asm" /l"led flash.lst" /e"led flash.err" /d__DEBUG=1
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 3 : Found directive in column 1. (__CONFIG)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 5 : Found directive in column 1. (CBLOCK)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 8 : Found directive in column 1. (ENDC)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 12 : Found directive in column 1. (org)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Found opcode in column 1. (bsf)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Overwriting previous address contents (0000)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 13 : Overwriting previous address contents (0000)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Found opcode in column 1. (movlw)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Overwriting previous address contents (0001)
Error[118] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 14 : Overwriting previous address contents (0001)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 15 : Found opcode in column 1. (movwf)
Message[302] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 15 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 16 : Found opcode in column 1. (movlw)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 17 : Found opcode in column 1. (movwf)
Message[302] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 17 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 18 : Found opcode in column 1. (bcf)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 21 : Found opcode in column 1. (bcf)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 24 : Found opcode in column 1. (btfsc)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 25 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 27 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 30 : Found opcode in column 1. (decfsz)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 31 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 33 : Found opcode in column 1. (goto)
Warning[203] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 36 : Found opcode in column 1. (bsf)
Warning[205] C:\USERS\GIG\DESKTOP\LAB\LED FLASH\LED FLASH.ASM 38 : Found directive in column 1. (end)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Users\GIG\Desktop\lab\led flash\led flash.mcp' failed.
Language tool versions: MPASMWIN.exe v5.50, mplink.exe v4.48, mplib.exe v4.48
Preprocessor symbol `__DEBUG' is defined.
Sun Jun 01 12:08:31 2014
----------------------------------------------------------------------
BUILD FAILED
Last edited by a moderator: