Prop to prop communication and programming
Don M
Posts: 1,653
I would like to look into connecting 2 propellers together. Just a simple Tx from Prop 1 to Rx on Prop 2 and Tx from Prop 2 to Rx on Prop 1. For inter-prop programming there will also need to be a connection of the reset from Prop 2 to Prop 1 (I think).
Prop 1 would be connected to the standard USB interface for programming and debugging. Prop 1 would have 2 pins connected to Prop 2 pins 30 & 31 plus the reset to enable downloading of code from USB > Prop 1 and allow Prop 1 to program Prop 2.
Doesn't have to be super fast 115K baud would be fine.
Prop 2 will operate independently of Prop 1. Prop 2 will respond to commands from Prop 1 and send data back to Prop 1 when requested.
So my questions are:
1. What programs / files / examples / demos exist for doing the inter-prop communication?
2. What programs / files / examples / demos exist for having one prop program the other ?
I would prefer these examples to be in spin / assembler and not other languages if that's possible.
The search of the forum turns up several examples such as Beau's code but would like to know what is tried and true, pros cons etc..
Edit: Can I assume that FDS might work for the inter-prop? But what about programming Prop 2 from Prop 1?
Don
Prop 1 would be connected to the standard USB interface for programming and debugging. Prop 1 would have 2 pins connected to Prop 2 pins 30 & 31 plus the reset to enable downloading of code from USB > Prop 1 and allow Prop 1 to program Prop 2.
Doesn't have to be super fast 115K baud would be fine.
Prop 2 will operate independently of Prop 1. Prop 2 will respond to commands from Prop 1 and send data back to Prop 1 when requested.
So my questions are:
1. What programs / files / examples / demos exist for doing the inter-prop communication?
2. What programs / files / examples / demos exist for having one prop program the other ?
I would prefer these examples to be in spin / assembler and not other languages if that's possible.
The search of the forum turns up several examples such as Beau's code but would like to know what is tried and true, pros cons etc..
Edit: Can I assume that FDS might work for the inter-prop? But what about programming Prop 2 from Prop 1?
Don
Comments
I need to compile the image for the slave prop, save it as a binary. I give it a name (for example) slave.binary
Here's where it's confusing to me-
Where do I store this binary file? Does it reside in a folder on the PC?
So next I would compile Propeller Loader with pins declared, settings etc. and in the dat section just list slave.binary?
Then download this to the Master Propeller and somehow it finds slave.binary and starts to load it into the Slave?
But it appears to only load it into RAM? As soon as I reset the slave QS it reverts back to the original program that was in there before.
Thanks for the suggestion however I have quite a bit of time invested in my project with the code I have.
Here's what I found to work satisfactorily so far today:
My testing setup: USB >>> QS board pins 12, 13, 14 >>> Propeller DNA pins 30, 31, Reset
1. I saved the EEPROM image of the program that I want to run independently on the Propeller DNA board and named it "loader.pgm" to an SD card
2. With power off the boards I plugged the SD card into the DNA board.
3. I powered up the boards and downloaded my simple program containing Chips Propeller Loader to load Brian Riley's SD Loader object http://obex.parallax.com/objects/620/
3. I powered the boards down then back on and viola! the program that was loaded into the DNA board now runs on it's own.
Thanks Brian and Chip! This seems to do what I need it to. I just need to make a slight modification to indicate when the SD Loader is finished.
The Slave will have the SD card accessible so I load Brian's object in the lower 32K of EEPROM and the SD card will load the object I need to run in the Slave in the upper 32K of EEPROM. If SD Loader doesn't find an upgrade on the SD card then it runs the program from the upper 32K. So simple.
The Main prop will always have the USB port accessible so the Main Prop can be updated via USB....
Gotta love this!
I guess you will have to use command 3.
Normally the second Prop does not have a eeprom in this sequential boot scheme.
I was able to use the Chips example to create a C# version, it skips the verify lsr data response though.
http://forums.parallax.com/showthread.php/138549-C-Prop-Serial-Boot-loader-example-for-the-Silabs-CP2110