PDA

View Full Version : In Circuit programming / boot loader options?



ShaneMichael
- 4th December 2015, 20:44
Hi I need some advice. I have been using the MicroCode boot loader for several years with the PIC18F2550 and 4550. Now I need a chip with a 12 bit A/D ( maybe the 18F4553?) but I don't find any loader files for any of the 12 bit A/D. chips. In the past I've had DigiKey or MicroChip program the loader when I purchase the micro chip, then I would assemble the circuit board with the chip ready to flash. Our technicians load the latest and greatest program with a serial connection for their need at the time of installation. So I have a single circuit board that works for 3 different applications, technicians choose and load the program as needed. I would like to retain the ability to program the chip while it's in the circuit and have it be an understandable process for me to train technicians.

I've read several threads regarding this but I haven't found a solution that I like yet.

1. Should I skip the boot loader and change my serial connection so I can use the Pickit 3 for the in circuit programming?
2. Is there an app or program that will make the bootloader file I need for the microchips?
3. Is there another source for bootloader files?
4. Another approach completely?

To me it seems number 1 is my best option based on what I've read so far. Can I get some suggestions or links/threads to help me out?
Thanks
I'm using PBP3
Microcode Studio Plus
:confused:

andywpg
- 5th December 2015, 00:02
Hi I need some advice. I have been using the MicroCode boot loader for several years with the PIC18F2550 and 4550. Now I need a chip with a 12 bit A/D ( maybe the 18F4553?) but I don't find any loader files for any of the 12 bit A/D. chips. In the past I've had DigiKey or MicroChip program the loader when I purchase the micro chip, then I would assemble the circuit board with the chip ready to flash. Our technicians load the latest and greatest program with a serial connection for their need at the time of installation. So I have a single circuit board that works for 3 different applications, technicians choose and load the program as needed. I would like to retain the ability to program the chip while it's in the circuit and have it be an understandable process for me to train technicians.

I've read several threads regarding this but I haven't found a solution that I like yet.

1. Should I skip the boot loader and change my serial connection so I can use the Pickit 3 for the in circuit programming?
2. Is there an app or program that will make the bootloader file I need for the microchips?
3. Is there another source for bootloader files?
4. Another approach completely?

To me it seems number 1 is my best option based on what I've read so far. Can I get some suggestions or links/threads to help me out?
Thanks
I'm using PBP3
Microcode Studio Plus
:confused:


Personally, I've never used a bootloader (not even sure if I would know HOW). I've always just put an ICSP header on any circuit I build, That way, when I'm developing a program, I leave the PicKit3 plugged in. When I see a change I need to make, I change it, hit "Compile & Program' and the program is compiled and sent. I often make a change, reprogram the chip, and start testing the change within 60 seconds!!

Not sure what the advantage of a bootloader is, but, I'm not in a commercial environment - its just stuff for me.

Just my two cents.....

Scampy
- 5th December 2015, 19:21
The only bootloader I've played with is Tiny (http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm It worked with an 18F2550 and as far as I know claims to work with most 18F chips...

Unless you are making a product that needs updated firmware in the field, or a device that uses PC software and could pull down any firmware updates then I can't see the advantages of using a bootloader over ICSP or programming on a development board

ShaneMichael
- 10th December 2015, 18:31
Thanks for the response.
The main advantage of the boot loader is you don't need a PicKit 3 or U2 programmer after the boot loader has been flashed to the device (you still need to get the boot loader on the target device the first time). New firmware is then loaded with a serial connection. I usually have a MAX232 chip in the circuit for protection, but that's optional. To load the new firmware you just compile/program in Microcode, it will wait for the microcontroller to reset then the new code loads. Depending on code size it takes a 2-30 seconds. Basically the same functionality at the end of the day. Back when I started I used the U2. I would take the microcontroller out of the circuit, put it in the U2, flash, reinstall the microcontroller, test, repeat. After a few hundred times of that I found the boot loader which allowed in circuit programming. It worked fine all this time so I stayed with it.
The cost of the PicKit 3 is about $50 from DigiKey, so I'm going to migrate that way. I'll add the ICSP header on my board then I should be able to use any(?) microchip. I think the technicians will like this since it's USB and the program can be saved on the PicKit 3 and flashed without being connected to a PC.

mark_s
- 10th December 2015, 19:18
I'll add the ICSP header on my board then I should be able to use any(?) microchip.


As far as I know all pic families are capable of ICSP. Keep in mind that the data and clock lines are
sensitive to what you have connected to these pins during programing. So, in your design be careful
to assign these for programing only, high impedance loads or add jumpers to disconnect the load.
I learned the hard way. I had a proto pcb made which had resistor and led connected to one these pins.
I had to unsolder one side of the resistor each time I programed.

Read this even if you are using a pickit3. Good info
http://melabs.com/support/icsp.htm

andywpg
- 10th December 2015, 20:32
I think the technicians will like this since it's USB and the program can be saved on the PicKit 3 and flashed without being connected to a PC.

I absolutely LOVE the Programmer-To-Go abilities! When I was tuning the PID loops for my first version of my charcoal smoker controller, I had the smoker going in the back yard. When I wanted to change one of the gains, I would go downstairs, set it up, then just go out in the back yard, reprogram the chip in circuit, and continue testing (with DELICIOUS results at the end of the test-session!).