Shop OBEX P1 Docs P2 Docs Learn Events
Program Prop from a PIC? — Parallax Forums

Program Prop from a PIC?

Has anyone done this already? I want to hang a propeller off the back of a PIC24 for an upcoming project, because I need a great stack of real-time IO that the PIC won't support. I know that the timing specs for programming the Prop have been published already, but I don't want to duplicate a couple days' work if it's not required.

Thanks!

Comments

  • Heater.Heater. Posts: 21,230
    A while ago I took the loader from prop-gcc and adapted it a little bit so that it could be used from a Raspberry Pi. It also works from Atheros MIPS processors as used in cheap WIFI routers. Code is here:
    https://github.com/ZiCog/pi-propeller-load.

    No idea how you would build that for the PIC24 but basically all you need is the main file : src/PLoadLib.c and provide it with the serial port access methods defined in src/osint.h


  • Excellent, thanks Heater.
  • ... you're just a handful of posts away from 16k. Remarkable.
  • Heater.Heater. Posts: 21,230
    Oh yeah. Just chatting. Most of it is gibberish. Some of it might be helpful to someone.

    I bet the young kids today crank up a lot more tweets and facebook posts than I can even dream of.
  • Cluso99Cluso99 Posts: 18,069
    I presume you will not be using an eeprom?
    If an eeprom is present you could have some simple code to load up hub from the PIC and run.
  • Loading up the Prop's EEPROM is very simple to do with a simple bit-bashed routine. You need 3 lines, one for reset and two for I2C. This also allows you to access more than 32k of EEPROM which you can't do with the Prop boot loader.
  • ErNaErNa Posts: 1,752
    It's always a question of product cost. If your task is to do a prototype or a small serie, you should not save money in hardware, but time to market. We wanted to use an XMC1100 as eeprom replacement. It turned out that writing the eeprom emulator took more than 4 weeks mostly due to verbose documentation of the chip. Only after some time we realized it would have been better to use another ARM chip (ST) with more flash and additional features at a higher price, but optimized from system level. However, booting the prop is not so difficult. At startup the prop uses internal R/C clock and synchronizes to the external data rate.
    @peter: waiting for answer on PM
  • JohnCJohnC Posts: 64
    edited 2016-03-09 00:08
    Thanks Peter & Cluso. I hadn't considered bypassing the prop altogether and simply writing to the EEPROM and then wagging the reset pin. Very elegant idea.

    With any luck, the propeller's firmware would never need to be updated in the field. But I'm terrified to completely close that particular back door. And after paying a few hundred dollars to FedEx Overnight once or twice and we'd be even re: development time.
  • You basically need to keep the propeller in reset state and write the EEPROM from the other MC. Then release the propeller to boot.

    Enjoy!

    Mike
Sign In or Register to comment.