Fast Inter-Propeller Communication
synapse
Posts: 19
All,
I am working on a project that requires many propellers to communicate back to a master propeller. I have tried several different methods one being the spin object in the title. However I found a problem and maybe it is the crystal I am using compared to the spin code in the download. After spending 2 hours tracking down why fullduplex serial wouldn't work for me because the _xinfreq was set to high in the download, and the default baud rate was higher than I expected. I finally got readable messages and unfortunately they all say wrong buffer. which of course if not correct. has anyone else got this code to work and if so has anyone else made any modifications to send strings and maybe use 1 cog instead of 3. I am willing to take the hit. I even tried FullDuplex serial between two propellers but that didn't work either. I must be missing something
I am working on a project that requires many propellers to communicate back to a master propeller. I have tried several different methods one being the spin object in the title. However I found a problem and maybe it is the crystal I am using compared to the spin code in the download. After spending 2 hours tracking down why fullduplex serial wouldn't work for me because the _xinfreq was set to high in the download, and the default baud rate was higher than I expected. I finally got readable messages and unfortunately they all say wrong buffer. which of course if not correct. has anyone else got this code to work and if so has anyone else made any modifications to send strings and maybe use 1 cog instead of 3. I am willing to take the hit. I even tried FullDuplex serial between two propellers but that didn't work either. I must be missing something
Comments
How much of a "hit" are you willing to take?
Or better to ask what byte or long transfer rate do you need? Sure, "faster is better", but there are implictions....
Cheers,
Peter (pjv)
As said before, wiring and code would be very helpful to help diagnose.
I've recently worked on a new version of the object re-written from scratch which address a timing issue (not the one above) and a RAM alteration problem. But as is, I use the software in a few personal projects. I hope to make the new version more robust, with a better inferface, to allow use with some more industrial Prop communication projects I have in the works. This new version is weeks out though; I have other things on my plate at the moment.
I have attached the schematic.
I do not have the reset transistor in line that is for use later. for programming.
Primary Propeller Code
secondary prop
1) one way comms with wires and leds and slow baud rate
2) two way comms with wires
3) wireless
I'm trying to figure out your schematic. I see a transistor, but there is no resistor on the base, and I'm not even sure from the schematic if propeller 0 is the master or propeller 1 is the master?
Can you explain a little more?
I think we can get this working but it might take a few steps along the way. I once had to drop the baud rate to 110 to debug something, and heck, I even went to 1 baud once. At that speed, with a LED, you can read the bytes yourself!
Leds on data lines do help too.
Do you have a schematic, even scribbled on the back of an envelope, that you could scan in? Or a photo of the layout? There are some things missing on the schematic posted above, maybe they are there and maybe not on the real board? Boring things like bypass capacitors.
I'm sure we can put our collective brains together and get this working! It sounds a very interesting project.
To answer the question about the vdd on p21. that is kinda how I am going to know if additional boards are hooked up. so This will be a stacked type system if I add an additional sensor it is meant to be generic at the master level. I removed it for now because it is unimportant to the problem at hand. Basically I don't want to eat up a cog if it doesn't need to and waste battery if it doesn't need to. that is long term right now I just want the two props talking. so My plan was to check that ping for high and if it is high then init if low don't.
I have some videos explaining this in detail on my website what my long term goal is at www.synapsesg.com
The only difference I have right now on my breadboard from the schematic is instead of pins 30 and 31 on p1 I am using p0 and p1. I was running into issues having to disconnect wires every time I wanted to load new firmware.
Really, fdx should work fine - use my "rr004" version with the buffer size set to 256 (note 512 does not work). It's in the obex.
If your spin code takes too long to take the bytes received out of the buffer you could overwrite the buffer (and lose a buffer full of characters).
Sorry I don't have the time right now to look at your code. This problem is definately able to be resolved.
lines between the Prop 1 chips. We are not sure how many of the data bits we will use on the production board but
will keep you updated on the progress.