Xbee + Picaxe question

Joeroddis

Member
Hello,
I was hoping to buy a set of xbee wireless modules, basically to make a remote control for a robot.

I need quite a lot of outputs to control servos, (minimum 8). When i looked at the manual for connecting more than one picaxe together, it was talking about connecting together using serial to get more outputs.

I don't want to transmit back from the robot, just control it.

Can i just simply run a jumper from the serial out pin (on the picaxe from the recieving module) and use the method in the manual?

My idea was that if i was simply controlling it, to not use any serin commands on the transmitter.

Would this work?
 

hippy

Technical Support
Staff member
I'm not sure what "the method in the manual" is, but if you mean, "can I forget all about receiving anything back", possibly, but that might mean changes to the code in the transmitter which sends data out. Without knowing how the setup works as a whole it's hard to say.

To prototype it, disconnect the serial returned, and get the code working with a single line plus 0V from the transmitting to receiving PICAXE first. That will answer if it's at all possible. If it is, you then have to work out how you can be sure you're sending data to the XBee when it's ready to receive data and not simply ignoring it.
 

hippy

Technical Support
Staff member
I need more outputs - what can I do?
Use the PICAXE-28X or 40X which can have up to 16 outputs. Or connect a single output (e.g. output7) from a first PICAXE chip to input0 of a second PICAXE-18 chip. Program the second PICAXE-18 chip with this simple program:

main: serin 0,N2400,b1
let pins = b1
goto main

The eight outputs of the second chip can now be controlled with a serout 7,N2400,(b2) command by the first chip, where b2 contains the ‘pins’ value (0 to 255) desired on the second chip. This gives you a total of 15 useable outputs


That will work, hard-wired, or via XBee, with the caveat that the receiver ( and any transmitting XBee ) must be ready for the data to be sent.

I'd actualy code that more efficiently as ...

Code:
Do
  Serin 0, N2400, pins
Loop
 

ciseco

Senior Member
And if you run your picaxe at 3.3v (no ext resonator) you dont need to worry about the resistor divider network as employed on the AXE210 board and also avoids the problem of the ST inputs on the X series, all around makes the circuit far simpler.

Cheers

Miles
________
glass pipe
 
Last edited:

hippy

Technical Support
Staff member
Download should be okay at 3V3.

If not, it's reasonably easy to knock up a small standalone download circuit on strip-board / vero-board or bread-board and program the PICAXE out of circuit.
 
Top