Xbee communication problem

jubenini

New Member
Hello,
I have an 18X hooked up to a picaxe connect board with an xbee modem, and another connect board hooked to my computer through the download cable. I am trying to send readings from an accelerometer, which is attached to the picaxe, to the computer so I can log them, but I am running into problems. When I run this program:

main:
serout 7,T2400,("HELLO",CR,LF)
pause 2000
goto main

and listen with my computer, it happily reads in HELLO over and over again complete with line breaks.
However, when I put the same serout command into the program that reads the accelerometer, it happily reads Zøtt:ºZø over and over again with no line breaks at all. Between the two programs, I didn't change any hardware, I just downloaded a new program. Does anyone have any idea what is happening?

thanks
 

Wrenow

Senior Member
I have some suspicions, but it might help to see the actual code you replaced it with and (hint) to know if it is numeric data you are sending.

Cheers,

Wreno
 

jubenini

New Member
hmm

Ok,
So I posted a little hastily.

In my code, I was setting the values of outputs 0-5 with the let pins command and a byte variable. Since the Xbee is output 7, it was setting that pin also. So, when I take out the let pins commands, it works. Moron!

which I suppose brings up another question... is there a quick way to set outputs 0-5 simultaneously without bothering the higher outputs, or do I need to do separate high commands for each pin?

Thanks for your help.
 

hippy

Ex-Staff (retired)
You can still use "pins=", just make sure that what you set output pin 7 to is what it would be if you were not altering it.
 
Top