Prop to Prop communication using fullduplexserial
I am trying to communicate between 2 props now and I am having a problem with the RX command on the full duplex serial.
I have no problem transmitting, but I loose data using the RX or RxStr or Rxdec command (on the receive side).
I am using 9600 baud and get very intermittent loss of data from prop to prop.
Maybe I should look up code on the OBEX for Prop to Prop communication.
Thanks again,
Don
I have no problem transmitting, but I loose data using the RX or RxStr or Rxdec command (on the receive side).
I am using 9600 baud and get very intermittent loss of data from prop to prop.
Maybe I should look up code on the OBEX for Prop to Prop communication.
Thanks again,
Don
Comments
Are you using a cross-over cable?
'
How far apart are the Prop's from each other.
The props are a few inches apart, which should work nicely at only 9600 baud.
hmmmmmmmmmmmmm,
Don
My problem is on the RX side. Does anyone have any code that does very simple communication between 2 props.
Maybe 9600 baud is entirely to slow.
thanks,
Don
- make sure you are issueing the software command to employ a crystal on both units (not RCTIME)
- make sure that you get serial output from the sender. Check it on another device
- you can get much faster transfers by adding a wire and doing SPI between the chips.
Good luck. Please post code.
Kwinn,
I have a good ground on both props . . . I just rechecked.
Thanks,
Don
Invent-O-Doc,
I have the correct 2 lines set up for the crystal . . . . for both props to run at 80Mhz.
I also can transmit from both prop boards , into the "parallax serial terminal", with no loss of data. My problem is the rx side.
I like your idea about SPI. I was actually thinking about SPI or I2C to communicate.
Thanks,
Don
Cluso99,
This sounds good. Can you point me to your code on the OBEX. I would love to see it.
Thanks,
Don
Sorry if this is redundant, but do you have the grounds of each prop connected to each other? I am unclear if by good ground you mean between or just from each prop to the ground on the circuit
Should I pause in between sending characters?
is there start or stop bits that I am missing?
PC.start(PC_Rx, PC_Tx, 0, PC_Baud) ' Initialize comms for PC
XB.start(XB_Rx, XB_Tx, 0, XB_Baud) ' Initialize comms for XBee
"5": ' Configure local
XB.str(string("abcdefghij")) 'this is my transmit code
"6": ' Query local
strIn[0] := XB.Rx 'this is the receiving code
strIn[1] := XB.Rx
strIn[2] := XB.Rx
strIn[3] := XB.Rx
strIn[4] := XB.Rx
strIn[5] := XB.Rx
strIn[6] := XB.Rx
strIn[7] := XB.Rx
strIn[8] := XB.Rx
strIn[9] := XB.Rx
PC.dec(strIn[0])
PC.dec(strIn[1])
PC.dec(strIn[2])
PC.dec(strIn[3])
PC.dec(strIn[4])
PC.dec(strIn[5])
PC.dec(strIn[6])
PC.dec(strIn[7])
PC.dec(strIn[8])
PC.dec(strIn[9])
thanks,
Don
The ground is connected between both Props. The wiring is shown below.
Prop1 gnd>
<Prop2 gnd
Prop1 Tx >
<Prop2 Rx
Prop1 Rx >
<Prop2 Tx
Thanks,
Don
I figured out what the problems was . . . . . a drum role please
There was another program running in another cog that was corrupting the Rx array data.
Thanks to everyone for the assistance.
It now runs flawless.
thanks,
Don