Ayne
New Member
I am using Inchworm to program My targeted Microcontroller, my targeted microcontroller is also PIC16F877A.
I write this program in Assembly
Then i build
Feed program in PIC using inchworm. the result is
But LEDs are not blinking on PORTC....
Where is the mistake???
I write this program in Assembly
Code:
;**********Declaration & Microcontroller configuration**************
Processor 16F877A
#include "P16F877A.INC"
__config 0x3F3A
;*******************Declaration of Variable*************************
cblock 0x20
CounterA
CounterB
CounterC
endc
;******************Program memory structure*************************
org 0x0000
goto main
;************************Main Program********************************
main
movlw b'00000000'
movwf TRISC
Program
movlw b'00000000'
movwf PORTC
call Delay
movlw b'11111111'
movwf PORTC
call Delay
goto Program ;Endless loop
Delay
;PIC Time Delay = 0.3130012 s with Osc = 20.000000 MHz
movlw D'8'
movwf CounterC
movlw D'248'
movwf CounterB
movlw D'106'
movwf CounterA
loop decfsz CounterA,1
goto loop
decfsz CounterB,1
goto loop
decfsz CounterC,1
goto loop
return
END
Then i build
Code:
Clean: Deleting intermediary and output files.
Clean: Deleted file "LED.err".
Clean: Deleted file "E:\Projects\LedTest\LED.cod".
Clean: Deleted file "E:\Projects\LedTest\LED.hex".
Clean: Deleted file "LED.lst".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F877A "LED.asm" /l"LED.lst" /e"LED.err"
Message[302] E:\PROJECTS\LEDTEST\LED.ASM 21 : Register in operand not in bank 0. Ensure that bank bits are correct.
Loaded E:\Projects\LedTest\LED.COD.
BUILD SUCCEEDED: Wed Mar 07 22:58:48 2007
Feed program in PIC using inchworm. the result is
Code:
MPLAB ICD 2 Ready
Erasing Target Device...
...Erase Succeeded
MPLAB ICD 2 Ready
Blank Checking...
...Program Memory
.. Config Memory
...EEPROM
...User ID Memory
...Blank Check Passed
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
...Erasing Part
...Programming Program Memory (0x0 - 0xB7)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
07-Mar-2007, 22:51:58
MPLAB ICD 2 Ready
But LEDs are not blinking on PORTC....
Where is the mistake???