Connecting 2 backpacks together using sio
Kevin Brown
Posts: 44
I have 2 backpack modules that I would like to connect using the single serial line.I have one backpack module with a XBee module on it. It is working fine I've tested it with a little serial pass through program and everything works fine when communicating with the XB connected to the computer using the serial terminal. I'm trying to use the second backpack module as a remote video driver. I works just fine when I use the BS /demo what am I missing when I try to use the backpack SIO/p27 to drive it.
Comments
{{
***************************************
* Serial_Pass_Through *
* Martin Hebel *
* Version 1.0 Copyright 2009 *
***************************************
* See end of file for terms of use. *
***************************************
Provides serial pass through for XBee (or other devices)
from the PC to the device via the Propeller. Baud rate
may differ between units though FullDuplexSerial can
buffer only 16 bytes.
}}
CON
_clkmode = xtal1 + pll8x
_xinfreq = 10_000_000
' Set pins and Baud rate for XBee comms
XB_Rx = 7
XB_Tx = 6
XB_Baud = 9600
' Set pins and baud rate for PC comms
PC_Rx = 31
PC_Tx = 27 '30
PC_Baud = 9600
Var
long stack[50] ' stack space for second cog
OBJ
PC : "FullDuplexSerial"
XB : "FullDuplexSerial"
Pub Start
PC.start(PC_Rx, PC_Tx,%1100, PC_Baud) ' Initialize comms for PC
XB.start(XB_Rx, XB_Tx, 0,XB_Baud) ' Initialize comms for XBee
cognew(PC_Comms,@stack) ' Start cog for XBee--> PC comms
PC.rxFlush ' Empty buffer for data from PC
repeat
XB.tx(PC.rx) ' Accept data from PC and send to XBee
Pub PC_Comms
XB.rxFlush ' Empty buffer for data from XB
repeat
PC.tx(XB.rx) ' Accept data from XBee and send to PC
{{
Your description is a bit unclear. Could you explain in more detail exactly what is connected to what, using which ports? A connection diagram would be even better.
Thanks,
-Phil
I want to connect the two backpack boards using the 3 pin header. I know I am missing something simple
thanks
Kevivn
My apologies! For some reason I saw Martin's name in this thread.
Anyway, the good news is that you don't need two Backpacks to do what you want. Save the extra one for another project! All you need is an XBee Adapter Board and a Proto-DB.
The XBee adapter can be soldered into the Proto-DB sideways, making contact with Power and ground. You will want to clip off the IO0 and IO1 header pins, along with Vdd and Vss at the other ends of the two headers. Then you can connect wires between the XBee DOUT and DIN pins to pins on the daughterboard connector. The Proto-DB then simply plugs into the Backpack.
-Phil
BTW,
-Phil
-Phil
Can you translate that in a schematic? (or maybe a picture)