Pic to Pic Firmware upgrade


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    26

    Default Pic to Pic Firmware upgrade

    Hi all,

    Has anyone know if it is possible to write a program in PBP that will read firmware from a serial interface and then program another Pic with the firmware?

    Ultimately I want to upgrade firmware wirelessly (RF and GPRS modem) so Pic to Pic will get me moving in the right direction.

    If it looks too hard, how do people who use Pics do downloadable firmware upgrades? It might give me a starting point to think laterally for a solution.

    Thanks

    Rich

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Bootloader should work. But this may require a two-way communication.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Have used several telecommunication products that upgraded it's firmware by radio. It’s not as straightforward as it seems.

    It should not be too difficult to transmit the firmware to the receiving GSM as internal error correction should keep errors to a minimum. But a RF link to the reciving PIC may give problems? The bigger the firmware the harder it will be. External memory will most likely be required. The biggest problem is getting an accurate copy of the firmware over to the receiving PIC. One company sends the firmware twice and compared it for errors. The firmware must be stored and checked before loading into the PIC's own memory. Remember any corruption of the transmitted firmware when loaded and run could ‘lock’ the receiving PIC. Necessitating a visit to do a hardwire re-programming.

    One system I had to use solved all these problems but forgot to allow for the phone connection 'dropping' in mid transfer. The result was a trip on site and reseting and reloading software.

    As has been said previously a modified version of a bootloader followed by a reset should do the job.

    Bob

  4. #4
    Join Date
    Sep 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default

    Thanks guys,

    OK, I already figured some external memory might be necessary to fit the code into prior to the actual reprogramming of remote Pic.

    The GPRS modem will have a TCP/IP stack so the file will be FTPed across air. So, that will deal with the data integrity of the firmware that reaches the actual hardwired network.

    When sending to the ultimate destination transmitting it twice and doing a compare sounds a good idea. It might end up more than twice but as long as it doesn't loose integrity that will be fine.

    Using a bootloader should eliminate the problem of failed firmware upgrade requiring a trip to 'shop' as the code will not be loaded unless it has been received error free providing the bootloader has the smarts.

    I guess what I need is bootloader code for a Pic. I am not clever enough (yet!) to write it so has anyone got any starting points for me? I bet someone has written one even if not in the PBP world. Hummm, a wider google search needed I think. I will post anything I find as this thread could be interesting as it develops.

    Thanks

    Rich

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Please note that if you are going to use a bootloader, your precious hex code will be free for anyone to copy it! There can not be bootloader AND code protection at the same time!

    Ioannis

  6. #6
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Hmm not really

    It works great with a bootloader and codeprotection together. It is even possible to encrypt the hexfile into jibberish on your PC and later letting the bootloader de-jibberish it while flashing it. This way the code is safe all the way (depending on what encryption used) and if you use a PIC that is safer (i.e 18 series).

    With codeprotection you can not read or write with an external programmer but the software inside the PIC (loader) can always erase and write in the codespace.

    This can be done PIC to PIC or I2C or serial or what ever kind of way....

    /me

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  3. PIC 18F4550, firmware
    By kutsi in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 2nd May 2007, 21:11
  4. Build PIC bootloader firmware in PBP?
    By Joe Rocci in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th August 2006, 19:53
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts