Hi,
I am running a simple program with my series 1 XSC module that transmits a single incrementing byte (0 to 255). The receiver simply receives this byte and displays it on a serial terminal.
But what I get is this (for example):
: 218
: 218
: 218
: 218
: 218
: 154
: 154
: 250
: 253
: 250
: 255
: 251
: 251
(the colons are hard coded in my code)
My code is below (PBASIC).
Anybody have any ideas on this?
I also have tried several display options, including using the XBIX-R Serial Dev board and using the Terminal window in X-CTU. If I do that, I usually get data that looks a lot like “…M…[…]…M…M…[;…[…;.;…”
The code I am using does not employ any flow control - it is the simplest form I could find for initial testing.
These are running on two separate BS2 development boards. The microcontrollers used are BS2SX.
Thanks very much for any help.
[CODE FOR TRANSMIT SIDE:]*
’ {$STAMP BS2sx}
’ {$PBASIC 2.5}
'***********************
XRX PIN 5 ’ Receive Pin (pin 2 on Xbee- DOut)
XTX PIN 4 ’ Transmit Pin (pin 3 on Xbee- Din)
X VAR Byte
HIGH XTX ’ Idle transmit pin
DO
X = X + 1
SEROUT XTX,84, [DEC X,CR] ’ Send value of X as decimal, any ascii message in quotes: “ASCII Message Here!”
DEBUG DEC X, CR
’ Second CR is added byte buffer for flow control example
PAUSE 1000
LOOP
END
*****[CODE FOR RECEIVE SIDE:]
’ {$STAMP BS2sx}
’ {$PBASIC 2.5}
’ ***************************
RX PIN 14 ’ Receive Pin
TX PIN 13 ’ Transmit Pin
X VAR Byte
HIGH TX ’ Idle transmit pin
DO
SERIN RX, 84, [X] ’ Receive data
DEBUG ": ", DEC X, CR
LOOP