Alexandra1
Joined: 10 Aug 2009 Posts: 3
|
|
Posted: Thu Aug 13, 2009 8:13 am |
|
|
Hi,
I had downloaded the AN851, I modified the file AMS for use with the PIC18f452, I had programed the pic with the bootload.hex using another programmer, now I can connect to the PIC18QP.exe, I can program my application using this bootloader, I can even read the memory, apparently everything is OK, but the problem is that when I press the "Normal Execution mode" and accept, apparently the pic must go the Modo RUN, but the application does not work and I can not enter again to boot mode, unless the bootloader program again or modify the last memory address of 0x00 to 0xff, someone could help me?
Here is aplication
Code: | #include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=19200, xmit=PIN_C6, rcv=PIN_C7,RESTART_WDT,ERRORS)
#define LEDV PIN_D0
#define LEDR PIN_D1
#define LED_ON output_high
#define LED_OFF output_low
#define VECTOR_RESET 0x200
#define VECTOR_INTERRUP 0x208
#build(reset=VECTOR_RESET, interrupt=VECTOR_INTERRUP)
#org 0x00, 0x1FF {} // Protejer este espacio
Necessary for Bootloader
void main()
{
LED_OFF (LEDV);
write_eeprom(255,"ff");
Delay_ms(500);
while (TRUE){
LED_ON (LEDV);
Delay_ms(400);
LED_OFF (LEDV);
Delay_ms(400);
}
}
|
|
|