​ ​ ​ ​ Reprogramming PICAXE with USB stick - ie FIRMWARE UPDATE - Page 2
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20

Thread: Reprogramming PICAXE with USB stick - ie FIRMWARE UPDATE

  1. #11
    Senior Member
    Join Date
    Feb 2012
    Location
    London
    Posts
    2,462

    Default

    Hi,

    Quote Originally Posted by Buzby View Post
    1, Build your remote devices with an X2, an I2C EEPROM, and a simple 'serial to USB' board.
    I may be misunderstanding the process, but USB is a Host-Slave architecture and AFAIK neither a PICaxe nor a memory Stick can be a Host. The Host needs access to a "library" to know how to talk to the Slave.

    But updating the PICaxe program via I2C from an external "slot" EEPROM (perhaps built into a "module") doesn't seem a great departure from the OP's original aim. EDIT: Ah, it seems you may have come to that conclusion in a later post.

    Cheers, Alan.

  2. #12
    Senior Member
    Join Date
    Feb 2009
    Location
    Cheshire, England
    Posts
    2,317
    Blog Entries
    4

    Default

    Quote Originally Posted by AllyCat View Post
    Hi, I may be misunderstanding the process, but USB is a Host-Slave architecture and AFAIK neither a PICaxe nor a memory Stick can be a Host
    Hi Alan,

    I used the wrong words, it's not a 'simple USB to serial', it's the Vdrive I suggested later.

    But you are correct, if it only needs to look to the eye that it's USB, then a fake USB stick ( but really I2C ) would work very simply.

    Cheers,

    Buzby

  3. #13
    Senior Member
    Join Date
    Jan 1970
    Location
    Perth, Western Australia
    Posts
    4,282

    Default

    Quote Originally Posted by Circuit View Post
    My understanding of booti2c is somewhat at variance with this; you say that the PICAXE would run slower than one running on internal flash; that is not the case because the program is not run from the EEPROM. Booti2c tests the version of the existing program and the program on the connected EEPROM. If the program on the EEPROM is newer then the existing program is replaced in the PICAXE chip. Therefore, the EEPROM is built into an external and pluggable unit - which could be similar in size to a USB stick - and then used to update the PICAXE program slot when required. It is not left in place, the program is not run from it and it is only used to transfer the updated program to the PICAXE.

    The advantage of this approach is that a simple pinned header or suchlike can be used to attach the updating EEPROM when required; the user is not confronted with the difficulty of changing a PICAXE chip.

    See:http://www.picaxe.com/BASIC-Commands...ation/booti2c/
    This thread sure is clearing out some cobwebs! Yes, an external EEPROM chip and booti2c would re-flash an X2 PICAXE - something that I had misunderstood.

  4. #14
    Senior Member
    Join Date
    Feb 2011
    Location
    Cardiff,UK
    Posts
    4,191

    Default

    There are a number of other (low cost) microcontrollers that can read a SD card direct.

    Thus if an I2C EEPROM was common between the two microcontrollers, it should be possible for the one with the SD card to disable the PICAXE temporarily, read the file from the SD card into the I2C EEPROM from where the PICAXE now boots.

    The cost in parts for the 'other' micro is maybe £3 or less.
    Picaxe in Space is now Silent (but probably still running)
    http://www.50dollarsat.info/

  5. #15

    Default

    Off on a tangent maybe, but the cheapest Raspberry Pi is now only £4/$4.

    You can program a picaxe via the Pi serial interface, and plug a memory stick into the Pi: http://captainbodgit.blogspot.co.uk/...g-with-pi.html

  6. #16
    Senior Member
    Join Date
    Apr 2012
    Location
    Cēsis, Latvia
    Posts
    817

    Default

    I was looking into updating picaxe firmware a while ago and did some testing, too.

    If the scope of your product/project allows to produce and 'proprietary firmware stick', then picaxe platform is probably as functional as any other with the advantage of simplicity of programming = maintenance.

    I would refrain from exactly USB plug unless you can make sure your device is not damaged if plugged into computers, USB chargers and similar devices .


    Good luck,

    Edmunds

  7. #17
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    23,316

    Default

    Quote Originally Posted by srnet View Post
    There are a number of other (low cost) microcontrollers that can read a SD card direct.
    Including a PICAXE, though one has to produce the bit-banged code to do that. One could perhaps use an X2 which can be an I2C slave and read various blocks of file off the SD card and retrieve those.

    Any auto-updating software scheme, especially with multiple PICAXE devices, is going to be complicated, and one has to wonder if the returns will ever justify the effort.

    I would say the most important thing is to reflect upon the need, see if there are other ways to do it, including allowing parameter setting rather than complete reprogramming. Perhaps the biggest question is what the product is, why it will need updating, and how often. What is the product retail cost and how much income is reprogramming worth, how much would be lost without it.

    They way I would probably approach this is to sell them an AXE027 cable and email them the updates they can program themselves. Or design it so they can remove the circuit board; you can send them a new one and have them return their old.

  8. #18
    Senior Member
    Join Date
    Feb 2013
    Location
    UK
    Posts
    362

    Default

    Quote Originally Posted by hippy View Post
    Or design it so they can remove the circuit board; you can send them a new one and have them return their old...
    Hippy, you have inspired me; I have been trying to think how I can run several different programs - a number beyond the slot capacity of the biggest PICAXE. I considered running from external i2c EEPROMs but I need the i2c function that is unavailable when the EEPROM is used for this purpose. I shall now look at designing a number of "program cartridges" with just the PICAXE chip mounted on a circuit board with the pins brought out on an edge connector. That way, I can have the main programs running from one chip and then a secondary cartridge with "maintenance mode" etc. loaded on it. I was thinking about moving this application over to the 32-bit Micromite system but this now keeps the design with my preferred PICAXE. Excellent!

  9. #19
    Senior Member
    Join Date
    Mar 2010
    Location
    Adelaide
    Posts
    2,479

    Default

    Why not just use "Team Viewer" its free for personal use, then you can log into the other persons computer and reprogram the chip via your own computer, that way no one else gets to see your code.

  10. #20
    Technical Support
    Join Date
    Jan 1970
    Location
    UK
    Posts
    23,316

    Default

    If File -> Export -> PICAXE Binary is used to create a .AXE file. That can then be sent to others and downloaded using the PICAXE Programmer App without having to disclose source code -

    http://www.picaxe.com/Software/Drive...Programmer-App

Tags for this Thread

Bookmarks

Posting Permissions

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