View previous topic :: View next topic |
Author |
Message |
matt1971
Joined: 26 Oct 2008 Posts: 15
|
Is it possible to use a Bootloader via USB to 2 pics? |
Posted: Wed Nov 12, 2008 4:05 am |
|
|
has anyone managed to get a piar of pics programmed via a single USB connection? I have two pics which currently "talk" via i2c, one is an 18F4553 and the other an 18F4650. The 18F4553 can be "flashed" via USB, is it possible to get this pic to then program the 18F4560?
The two pics need two different .hex files uploaded. |
|
|
Ttelmah Guest
|
|
Posted: Wed Nov 12, 2008 5:23 am |
|
|
Yes.
At the end of the day, what communication interface the bootloader uses, is completely 'up to you'. You would not find any off the shelf one that uses I2C, but the example one, could be modified to use this, rather than RS232.
Best Wishes |
|
|
matt1971
Joined: 26 Oct 2008 Posts: 15
|
|
Posted: Wed Nov 12, 2008 7:03 am |
|
|
The communication seems "reasonably" straightforward. But what about timing. For the PIC18F4553 connected to the PC via USB, this is fine. But once this is programmed, this will take a few seconds, how can I then get the 4553 to program the 4560 ? |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
|
Posted: Wed Nov 12, 2008 8:42 am |
|
|
matt1971 wrote: | The communication seems "reasonably" straightforward. But what about timing. For the PIC18F4553 connected to the PC via USB, this is fine. But once this is programmed, this will take a few seconds, how can I then get the 4553 to program the 4560 ? |
Not sure if I should share this with you based on an earlier pm you sent me, but then again I am a mug :-)
The mechanism I use for cascading bootloaders is to put the primary PIC in bootloader mode (USB PIC) and implement a special command that puts the primary bootloader into transparent mode. In transparent mode the primary pic echos byes between the upstream (USB) and downstream (interface to slave pic). The primary pic either needs a mechanism to reset the slave to put the slave into bootloader mode or your application needs some mechanism to put the slave pic in bootloader mode before putting the primary pic into bootloader mode. I have used various different methods to achieve this. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
|