|
|
View previous topic :: View next topic |
Author |
Message |
kirk jaackman
Joined: 02 Mar 2004 Posts: 1
|
Bootloader on 877A, refresh apps program |
Posted: Tue May 04, 2004 10:00 am |
|
|
Hi,
I'm wanting to make 16F877As that can be field programmable AND UPDATED if need be.
I have successfully used the ex_load.c and loader.c to down load a simple program onto my CCS 877A proto board. I'm seeing the following behavior:
I download the program with my ICD. I start it and it prompts my PC screen, 'press 'L' to download program' (Using the CCS siow). I do file>download software>pick the hex file, and the application file comes up running. Fine. Hurray!
Yet, when I reset the processor it comes up, immediately, in the application program.
If I reset the processor BEFORE doing any download it comes up again in bootload mode.
*** What I am wanting is for the PIC to wait a few seconds or look for a jumper in order to possibly program something new to the chip. If no load request is made (or if a jumper is not set), THEN, it rolls into the application program. Where would I put this conditional branch where it would be seen at every power up?
I noticed in the source code for EX_LOAD.C:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) // Jumpers: 8 to 11, 7 to 12
What are these jumpers for and for what chip type? ( pin assignments ) I was thinking that they might be used to get the bootloader to come up fresh to input a new program. I do not see reference to the jumpers in the code.
One minor thing ( i hope) is the fact that I get a promt before downloading the bootloader thru the ICD that my 877a is different from the 877 file in the program. I overide it and seems to work fine, but I still have this 'update for a second program' problem. |
|
|
Ttelmah Guest
|
Re: Bootloader on 877A, refresh apps program |
Posted: Tue May 04, 2004 10:52 am |
|
|
kirk jaackman wrote: | Hi,
I'm wanting to make 16F877As that can be field programmable AND UPDATED if need be.
I have successfully used the ex_load.c and loader.c to down load a simple program onto my CCS 877A proto board. I'm seeing the following behavior:
I download the program with my ICD. I start it and it prompts my PC screen, 'press 'L' to download program' (Using the CCS siow). I do file>download software>pick the hex file, and the application file comes up running. Fine. Hurray!
Yet, when I reset the processor it comes up, immediately, in the application program.
If I reset the processor BEFORE doing any download it comes up again in bootload mode.
*** What I am wanting is for the PIC to wait a few seconds or look for a jumper in order to possibly program something new to the chip. If no load request is made (or if a jumper is not set), THEN, it rolls into the application program. Where would I put this conditional branch where it would be seen at every power up?
I noticed in the source code for EX_LOAD.C:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7) // Jumpers: 8 to 11, 7 to 12
What are these jumpers for and for what chip type? ( pin assignments ) I was thinking that they might be used to get the bootloader to come up fresh to input a new program. I do not see reference to the jumpers in the code.
One minor thing ( i hope) is the fact that I get a promt before downloading the bootloader thru the ICD that my 877a is different from the 877 file in the program. I overide it and seems to work fine, but I still have this 'update for a second program' problem. |
Remember your code has to be compiled to 'allow for' the bootloader, or it will overwrite the bootloader. It sounds as if this is what is happening to you. Then the bootloader needs to include a test for the 'program' jumper, and if not present, jump straight to the main code, or otherwise execute the actual loading code. This part of the code needs to be setup by you to suit your hardware.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|