XBee Pro sleep mode SM 1 or 2 with ADC

Hi, I am working on a project where i am reading an accelerometer directly using the ADC ports of the XBee Pro (x=20, y=19, z=18).

What I want is to be able to switch to a low power consumption mode, so putting the xbee to sleep. Once i set the ATSM command to 1, the Xbee seems to stop sending any data, or is in sleep mode. Which I find a bit strange since the datasheet says: in order to set the module into sleep mode, pin 9 has to be high, and to wake the device pin 9 has to be low. Since I have not connected pin 9, it should be low and the device should be awake.

What am I doing wrong here!? help is greatly appreciated!

Laurens

Pin 9 has a pullup resistor associated with it, and the default is that pullup resistors are enabled. So if you leave the pin disconnected, the pullup resistor will ensure that it always has a logic high value.

wow thank you so much johnf, never should have thought of that indeed.

It is possible to set the internal pullup to zero for DI8/pin9; do you know the command I have to fill in there? how do I specify the pullup to be zero only for this pin?

thanx again

It’s the PR command. It takes a parameter between 0 and 0xff, in which each bit controls one of the eight available pullup resistors. If you check the manual, it’ll tell you which bit controls which resistor.

Hum, is this safe to not have a pull up/down resistor on an input like the sleep pin?

If you have an input (like this sleep pin), and you have nothing connected to it, isn’t there the chance that it will have seemingly random changes in pin state, picking up electrical noise from the environment, or capacitively coupling the state of a nearby pin?

If so, might I suggest config’ing out the internal pullup resistor and then adding a pulldown resistor of your own.

I take your point about noise, but presumably if you disable the pullup resistor in the first place it’s because you’re going to connect driver circuitry to the pin that will have a low enough impedance in both states. So I don’t really see the possibility of noise as an issue.