I suspect I have some sort of data conversion error. But here are my connections in the event that is the problem.
Xbee TX (pin 2) to ZX pin 6. The Xbee holds it at 3.25 volts until it is transmitting and then it fluctuates a few tenths of a volt lower (I only have a $20 meter and no scope)
I have no trouble with data in the other direction but I am just outputting the ZX through a divider circuit using two resistors to get it below the 3.3V the Xbee requires.
All of this is occurring with the two devices separated by about 6 inches of wire. Thanks in advance.
Code: Select all
Const crlf as String = Chr(&H0d)
Const comPort as Byte = 3
Const rxPin as Byte = 6
Const txPin as Byte = 4
Const qsize as Byte = 40
Dim oq(1 to qsize) as Byte
Dim iq(1 to qsize) as Byte
Sub Main()
dim Data as byte
' prepare the serial channel
Call OpenQueue(iq, SizeOf(iq))
Call OpenQueue(oq, SizeOf(oq))
Call DefineCom(comPort, rxPin, txPin, &H08)
Call OpenCom(3, 4800, iq, oq)
do
Call Delay(0.05)
call getqueue(iq,data,1)
debug.print (data)
loop
End Sub