Re: Automatically sample Inputs

Hi, I’d like to make a similar wireless system, but I don’t know how to do it, can you help me?
I have some Xbee ZNet 2.5 series 2 modules, I have set them with API firmware (1coordinator and some routers). Now, I should assemble API packets by XCtu but I can’t use the terminal as I used to do with At commands, right?
I read the manual but I haven’t found how to include the destination address into an API frame, cause I need to know exactly from which module I’m receiving a specific analog input.
Thanks for your help, tell me if I didn’t explain well my problem!

ps. can I use the pin20 as a normal analog input? or should I keep it with the default option and set the next pin?

I don’t have an answer for your question, but I’d suggest reposting the question in the forum for the 2.5 series. This forum covers the series 1, so it’s less likely that your post will be read by someone who does have an answer.

Hope that helps (if only indirectly:-)

“Now, I should assemble API packets by XCtu but I can’t use the terminal as I used to do with At commands, right?”

You CAN assemble API packets via XCTU, in the terminal tab, Assemble Packet button. You will also need to know the format for assembling an API packet, which is information that can be found in the ZNet 2.5 product manual:

Chapter 6 is dedicated to API mode operation, but there are other API-relevant parts of the manual as well. I believe page 65 talks about addressing for instance.

I don’t have the answer to your question about pin 20. Perhaps someone else might.

Pin 20 provides some useful commissioning behaviors that can be triggered by a button press (or any high-to-low level transition on pin 20):

  • 1 press (when joined): Blink Associate LED on all devices in the network
  • 1 press (when unjoined): Associate LED blinks an error code indicating why the last join attempt failed. (See ATAI command)
  • 2 presses: Enable joining for 1 minute (if NJ < 0xFF)
  • 4 presses: Reset module parameters to default and leave the network (and attempt to join a new network).

Each of these behaviors can be triggered in software with the ATCB command. For example, issuing the ATCB command with a parameter of 1 triggers the 1 button press action.

If you don’t need these behaviors in your system, or if the ATCB software command can be used to implement them, then you could use pin 20 as an A/D. Otherwise, if you want to support a press button or other hardware trigger to use these behaviors, then you might want to use a different pin (17-19) for an A/D.

thanks damons! your reply is really interesting! do you also know if is therea blinkin pin? I heard that there should be a pin (maybe the 13 or 15) that sens periodically an output signal (like 4 times a second), perhaps to control a led. I need to reduce my module power consume to the lowest level, so these 4times a second (with 15mA consume every time) are a lot for my goal. do you know if there is a software or hardware way to stop it? I don’t need this blinkin signal. I hope you can help me!

Sure -
The D5 command enables the blinking behavior on the Associate LED pin. D5 defaults to a value of 1 (associated LED functionality). You can turn this off by setting D5 to a different value (4=output low, 5=output high, etc).

thanks damons, but I don’t need to deactivate the associating LED pin, but the module status pin (pin 13), corresponding to the D9 command. the manual doesn’t say anything about this pib, maybe I’d need to modify the formware in order to solve my problem… :frowning:

Pin 13 (On/Sleep) is driven high when the module is awake and low when it is sleeping. You can leave it disconnected if you don’t need it. Why is this behavior problematic?

because I’ve analyzed the pin 13 signal emission through an oscilloscope, and it shows a blinking voltage (4 per minute) during the sleep mode, while, as you say, it should remain high or low, not blinking.
is there a way to deactivate this pin?

What are the ATSM, ST and SP commands set to on your device?

I haven’t changed them, they’re the default ones. I just activate the SM and that’s all…