vinodstanur
Advanced Member level 3
- Joined
- Oct 31, 2009
- Messages
- 751
- Helped
- 114
- Reputation
- 234
- Reaction score
- 114
- Trophy points
- 1,333
- Location
- Kerala (INDIA)
- Activity points
- 7,054
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ;*****Set up the Constants**** STATUS equ 03h ;Address of the STATUS register TRISD equ 88h ;Address of the tristate register for port A PORTD equ 08h ;Address of Port A COUNT1 equ 20h ;First counter for our delay loops COUNT2 equ 21h ;Second counter for our delay loops COUNT3 equ 23h ;Second counter for our delay loops ;****Set up the port**** bsf STATUS,5 ;Switch to Bank 1 movlw 00h ;Set the Port A pins movwf TRISD ;to output. bcf STATUS,5 ;Switch back to Bank 0 movlw h'10' movwf COUNT3 ;****Turn the LED off**** Start call Delay movlw h'00' movwf PORTD ;****Turn the LED on**** call Delay movlw h'ff' movwf PORTD goto Start ;delay routine Delay Loop1 decfsz COUNT1,1 goto Loop1 decfsz COUNT2,1 goto Loop1 decfsz COUNT3,1 goto Loop1 movlw h'5' movwf COUNT3 return end
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\vinod\My Documents\pic projects\MY ASMMMMMM.mcp' started.
Language tool versions: MPASMWIN.exe v5.36, mplink.exe v4.36, mplib.exe v4.36
Preprocessor symbol `__DEBUG' is defined.
Sat Jun 25 12:38:17 2011
----------------------------------------------------------------------
Make: The target "E:\microcontroller\new 2842011 c files\asm3.o" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F877A "asm3.asm" /l"asm3.lst" /e"asm3.err" /d__DEBUG=1
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 1 : Found directive in column 1. (LIST)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 4 : Found directive in column 1. (__CONFIG)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 10 : Found directive in column 1. (CBLOCK)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 13 : Found directive in column 1. (ENDC)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 15 : Found directive in column 1. (ORG)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 16 : Found opcode in column 1. (goto)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 17 : Found directive in column 1. (ORG)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 20 : Found opcode in column 1. (bsf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 21 : Found opcode in column 1. (movlw)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 22 : Found opcode in column 1. (movwf)
Message[302] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 22 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 23 : Found opcode in column 1. (bcf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 24 : Found opcode in column 1. (clrf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 25 : Found opcode in column 1. (return)
Error[108] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 27 : Illegal character (*)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 30 : Found opcode in column 1. (movlw)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 31 : Found opcode in column 1. (movwf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 33 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 34 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 35 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 36 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 37 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 38 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 39 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 40 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 41 : Found opcode in column 1. (nop)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 42 : Found opcode in column 1. (clrwdt)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 43 : Found opcode in column 1. (decfsz)
Message[305] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 43 : Using default destination of 1 (file).
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 44 : Found opcode in column 1. (goto)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 45 : Found opcode in column 1. (return)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 48 : Found opcode in column 1. (call)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 49 : Found opcode in column 1. (decfsz)
Message[305] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 49 : Using default destination of 1 (file).
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 50 : Found opcode in column 1. (goto)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 51 : Found opcode in column 1. (return)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 54 : Found opcode in column 1. (movlw)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 55 : Found opcode in column 1. (movwf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 56 : Found opcode in column 1. (goto)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 61 : Found opcode in column 1. (call)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 63 : Found opcode in column 1. (bsf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 64 : Found opcode in column 1. (call)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 65 : Found opcode in column 1. (bcf)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 66 : Found opcode in column 1. (call)
Warning[203] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 67 : Found opcode in column 1. (goto)
Warning[205] E:\MICROCONTROLLER\NEW 2842011 C FILES\ASM3.ASM 69 : Found directive in column 1. (end)
Halting build on first failure as requested.
----------------------------------------------------------------------
Debug build of project `C:\Documents and Settings\vinod\My Documents\pic projects\MY ASMMMMMM.mcp' failed.
Language tool versions: MPASMWIN.exe v5.36, mplink.exe v4.36, mplib.exe v4.36
Preprocessor symbol `__DEBUG' is defined.
Sat Jun 25 12:38:20 2011
----------------------------------------------------------------------
BUILD FAILED
Now i think it is really tough for me to understand:-|, could you give me a small example?
Which bootloader are you using? Microchip's AN851, AN1310, etc?
Most bootloaders include at least a sample linker script with their installation.
Have a look in the installation directory on your system for a file with a .lkr extension.
When you identify the bootloader version and the existence of the linker script, I can step you through the process.
Ciao
Code ASM - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 LIST P=16F877A;, F=INHX8M #include <p16f877a.inc> __CONFIG _HS_OSC & _CP_OFF & _WDT_OFF & _BODEN_ON & _PWRTE_ON & _LVP_OFF & _DEBUG_OFF & _CPD_OFF ;*****Set up the Constants**** STATUS equ 03h ;Address of the STATUS register TRISD equ 88h ;Address of the tristate register for port A PORTD equ 08h ;Address of Port A COUNT1 equ 20h ;First counter for our delay loops COUNT2 equ 21h ;Second counter for our delay loops COUNT3 equ 23h ;Second counter for our delay loops [COLOR="#0000FF"];******************* Necessary Code For Tiny Bootloader ****************************** ORG 0x0000 clrf STATUS movlw 0x00 movwf PCLATH goto Init ;*****************************************************************************[/COLOR] ;****Set up the port**** [COLOR="#0000FF"]Init[/COLOR] bsf STATUS,5 ;Switch to Bank 1 movlw 00h ;Set the Port A pins movwf TRISD ;to output. bcf STATUS,5 ;Switch back to Bank 0 movlw h'10' movwf COUNT3 ;****Turn the LED off**** Start call Delay movlw h'00' movwf PORTD ;****Turn the LED on**** call Delay movlw h'ff' movwf PORTD goto Start ;delay routine Delay Loop1 decfsz COUNT1,1 goto Loop1 decfsz COUNT2,1 goto Loop1 decfsz COUNT3,1 goto Loop1 movlw h'5' movwf COUNT3 return end
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?