programming a propeller with another propeller
dr hydra
Posts: 212
I know it's a strange question...but has anyone used a propeller to program another propeller? The reason I am asking is that I have an ARM chip that can function as a USB to Uart bridge...however, it does not have a CTR line to control the reset for programming the propeller. So, my idea is to use a "programmer propeller" to act as a conduit from the ARM to the propeller that I would like to program...the "programmer propeller" would control the CTR line to control the reset and receive data from the ARM to program the final propeller chip.
Comments
I think you are right...that is a lot of work to programmer one propeller...it is probably best just to create a full ARM to propeller programmer (CTR, TX, RX) lines. Is there a good source for the programming protocol for a propeller?
What we do on the Raspberry Pi, some other ARM boards and even embedded MIPS boards is use the Tx and Rx pins on a UART directly connected to a Propeller.The Propeller reset is connected to a spare GPIO pin.
I made a customized loader to run on such ARM/MIPS boards that does this: https://github.com/ZiCog/pi-propeller-load
The other loaders from prop-gcc and SimpleIDE/PropellerIDE should also be able to do this by now.
Everything you need to know about the protocol is contained in this file https://github.com/ZiCog/pi-propeller-load/blob/master/src/PLoadLib.c
In fact that file is a self contained Prop loader.
What if your Pi is at a remote location and it is using a Propeller to help with some real-time, real-world interfacing that Linux is not suited to. Effectively the code running on the Pi and the code running in the Prop are all part of the same application. So now, if you can load the Prop from the Pi you can remotely update both of them at the same time.
Carrying that one stage further, if your Pi or whatever SBC is managed by a system like resin.io you can apply updates to many remote Pi/Prop pairs very easily. https://resin.io/
As mentioned, it would be nice to have specifics.
Here is a Propeller chip programmer made from Prop DIP 40, without an ARM:
If the problem is the lack of a real serial port... Well it is great when you reach the stage in tinkering when it is time to design custom boards and build things differently. You can convert USB to serial for under $2 (search USB serial on ebay), but these use a chipset that is an emulation of the ft232 and it doesn't get it quite right with the dtr timing. Search instead 'usb serial ft232' and the adapters are more like $14, but there are cheaper ones coming out used for arduino that say they use the ft232 and which bring out pins on a header rather than a D9.
Lots of solutions and all good fun to play around with!
[google]
Ok this exact question has come up before, the last time was as late as this February. This thread: Can a Prop program Another Prop [..] and msrobots included the code from Chip in post #6
-Tor
I think because he wants an excuse to buy another chip to play with Can't blame him there :P