Connect with us

PIC micro firmware update

Discussion in 'Electronic Design' started by Victor, Mar 7, 2007.

Scroll to continue with content
  1. Victor

    Victor Guest

    Hello all...

    I've just started to think about how to update a (slave) PIC mcu's
    firmware using another PIC (master) thru I2C. Basically, the master mcu
    will get the data from its usb port and send it to the slave mcu using
    i2c....

    Does anyone know where could I find any information on this subject ?
    Thanx a lot...
    Regards.
    Victor
     
  2. I suppose you could do this, but you will need a boot loader installed in
    the the target PIC. The protocol to program a PIC is not I2C based.
     
  3. Victor

    Victor Guest

    Anthony Fremont a écrit :
    Yes, I suppose a slightly different bootloader based on the PIC18F
    bootloader (AN851) could be used for this opperation, but have found
    nothing on the Microchip's web site on this...
     
  4. Search on PIC bootloader.


    Best regards,
    Spehro Pefhany
     
  5. Donald

    Donald Guest

    Would help if we knew which PICs are involved here.

    But guessing what people are thinking in this newsgroup is standard.

    Some of the older PICs can not in-circuit program.
    Are you using one of those ??

    But I'm only guessing.

    donald
     
  6. Victor

    Victor Guest

    Donald a écrit :
    The master PIC could for example be a PIC18F4550 and the slave(s)
    PIC18Fxx 's. So, recent PIC families and none of the older ones ! In any
    case, the slaves programming (firmware) will have to be done through I2C
    so they previously have to be programmed with some kind of bootloader
    that will fill the program memory with data coming from the I2C port.

    thanx for guessing... :)
    Victor
     
  7. Guest

    But why? Any reason you're insisting on i2c? Because:
    If you're using a bootloader anyway then you don't ever need the
    master PIC, program the slave PIC to accept data directly from
    whatever is convenient: USB, Serial etc. Therefore you don't need i2c.

    On the other hand, if you insist on using a master PIC then why waste
    program memory by requiring a bootloader on the slave PIC? Just use a
    slave PIC with LVP and use Microchip's documented and published ICSP
    protocol to program the slave. Therefore again you don't need i2c.

    So, any reason you're insisting on i2c?
     
  8. Victor

    Victor Guest

    a écrit :
    To program the PIC using USB/serial you prior need a bootloader on the
    chip...
    Well, the reason why we'll need a bootloader on each PIC is that the
    embedded firmware may be modified and has to be easily downloaded on
    each device.

    The only port accessible will be either USB or serial; the customer
    hasn't got an ICD and only the bootloaders will be programmed by us.

    That's why I pretend that the I2C port connecting master to slaves is
    the best solution...
     
  9. Guest

    To program the PIC using i2c you prior need a bootloader on the
    chip... anyway. Same difference. Also the amount of code required to
    implement an i2c bootloader on the slave is roughly the same as to
    implement a serial bootloader.
    They don't need an ICD, just an ICSP.
    Your "master chip" is in effect a built-in ICSP that you're shipping
    with your product. My suggestion is that rather than have a bootloader
    in the slave communicating in i2c with the master, have the master
    directly talk to the slave in ICSP protocol. That way you don't need
    any bootloader on the slave and you only need to waste 2 i/o pins
    (RB6&RB7) which you'll be wasting anyway if you program in i2c.

    The ICSP protocol is daunting but not that hard. These days there are
    lots of PICs that don't require high voltage to program provided
    you're willing to sacrifice another i/o pin for the LVP function.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-