Bootloader that can load using SPI or RS-232 without using a computer


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Bootloader that can load using SPI or RS-232 without using a computer

    I searched the forums and found a little bit of information but nothing that fits exactly what I need. Is there a way to load a hex file into an 18F without the use of a computer using SPI or RS-232? Not concerned about security or the smaller details at the moment - just curious if it can be done.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    So you DON'T want to use either a computer, SPI or RS-232, is that correct? Or do you mean that you DO want to use SPI or RS-232 just NOT from a computer?

    This isn't actually bootloading but the result, I think, is what you're after: One way to do it is to get a PICKit3 and use its Programmer-To-Go feature. You download the firmware file into the PICKit3, in the field you connect the PICKit3 to the programming header on your board and press the button - done. You do need to supply power the PICKit3 thru its USB connector but its just power, no data.

    /Henrik

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    To add to Henrik's remarks. A PicKit2 will do the same job and the USB supply can come from either a USB "brick" or a USB power bank.

    George

  4. #4
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    A PicKit2 wouldn't work. If another IC had SPI, RS-232 or some other communication protocol that would work, could that IC load the HEX file onto the PIC without human intervention?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    You're being quite vague IMHO, secret government project? :-)
    You say no human intervention....so who's deciding when to load the new firmware?

    Abyway, in theory yes. As long as the PIC can program its own memory you can create a bootloader that reads the .hex file from "anywhere" (USB, SPI, RS232, I2C, parallel bus, whatever using whatever protocol). But remember that it's actually the PIC itself that is loading/programming itself with "information" from the other device - its not the other device that is "programming" the PIC.

    There are, for example, bootloaders available which reads the code from a memory card (CF, SD, MMC etc). I don't know of any written in PBP though.

    /Henrik.

  6. #6
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    a winbond flash chip (w25q32bv or similar) mounted in a sd shell would be nice . you could have the utility of a sd card slot without all the overhead of a sd fat-16 file system .

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    I don't have any experience with memory cards outside of my digital camera etc but can't you use it basically as a "raw" memory simply by NOT formatting as FAT or whatever. I mean the protocol is likely (haven't looked it up) different than a simple SPI flash IC and without a "proper" file system you won't be able to read/write it from the PC but you can't really do that (easily in this context) with a "raw" SPI flash IC either so what's the difference?

    /Henrik.

  8. #8
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    You say no human intervention....so who's deciding when to load the new firmware?
    I meant there wouldn't be anyone physically at the device. The device has internet connectivity so the HEX files can be transferred that way.

    There are, for example, bootloaders available which reads the code from a memory card (CF, SD, MMC etc). I don't know of any written in PBP though.
    This would be a good kickstarter project. Any takers?

  9. #9
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383


    Did you find this post helpful? Yes | No

    Default Re: Bootloader that can load using SPI or RS-232 without using a computer

    I don't have any experience with memory cards outside of my digital camera etc but can't you use it basically as a "raw" memory simply by NOT formatting as FAT or whatever. I mean the protocol is likely (haven't looked it up) different than a simple SPI flash IC and without a "proper" file system you won't be able to read/write it from the PC but you can't really do that (easily in this context) with a "raw" SPI flash IC either so what's the difference?

    /Henrik.
    only code size , simplicity and 8 bit mcu friendliness . plus I already know how to talk to a spi flash chip a quick look a sd protocol looks involved

    http://alumni.cs.ucr.edu/~amitra/sdc...note_foust.pdf

    http://www.microchip.com/forums/m530149.a

Similar Threads

  1. Replies: 2
    Last Post: - 5th November 2012, 18:26
  2. Load caps
    By grounded in forum Off Topic
    Replies: 0
    Last Post: - 30th November 2009, 16:43
  3. Measuring mains load
    By Freman in forum General
    Replies: 6
    Last Post: - 13th June 2008, 01:33
  4. Max/232 Bootloader problems - Schematic attached...
    By rossfree in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 4th May 2007, 16:54
  5. ADC Load
    By CocaColaKid in forum General
    Replies: 3
    Last Post: - 19th November 2004, 13:43

Members who have read this thread : 1

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