XBee without uC

Is it possible to configure XBee series 2 modems to send a fixed data on the occurrence of an event without using a micro-controller?

One can set XBee ZB to detect a change on a digital input and then send the pin data out. Look at AT command ‘IC’.

Is this what you want to do?

You mean interrupt-driven? I don’t think so, but I’ve been wondering that myself lately!

yes exactly. Using a controller is making my design bulky and expensive. Is there a way to eliminate it?

“Is it possible to configure XBee series 2 modems to send a fixed data on the occurrence of an event without using a micro-controller?”

Please describe this in more detail. What kind of “fixed data”? Occurrence of what type event?

@admin: fixed data could be the a particular ID assigned to the module or even its serial number. The event could be press of a button.
Basically I want to pass the information that a particular button (or even a single button) is pressed at the transmitter(remote). I want to pass this information to the base without using a controller or host PC at either end. Is this possible?

@waltr:in series 2 you need to send an AT command to the remote to sample its input lines. For this you either need a controller or PC. I don’t want to use either of them.

I have project to send API packet to the coordinator without using (X_CTU), all the xbees are set up in API mode. I have installed the end device which is connected to the microcontroller ATMEL 89c52 as a (ZIGBEE END DEVICE API) & the coordinator which is connected to the PC-hyper terminal (ZIGBEE COORDINATOR API), and I can send (packet data) from end device to coordinator but cannot see it come out of the UART.
My question is how can I enable the API (like X_CUT software), I cannot use +++ in this mode. I’m sure data is being successfully sent (led indicator is glow when send data).

I finally succeeded in passing a fixed value from one Xbee to another (series 2) without using micro-controller! Thanks to all those who helped.

What was your configuration?

i also wanted to know the configuration… can you share it with us?that will be a great help for us…thnaks
@waltr how can i configure that? from what pin will it going to output the I/O sampling? since i am using from end device to coordinator? im quite confuse… the coordinator doesnt support I/O sampling…

Look at the AT command ‘IC’. This sets a bit mask for a pin Change Detect. If the masked input pin changes then an IO sample is forced. This works as if an AT command ‘IS’ was sent to the module so the forced sample would be sent to the destination specified by DH & DL in the same format as the IO data from an ‘IS’ command. This would need to be parsed at the receiving end.

I think there is a little confusion as to what the original poster wants the end device to do and the different solutions presented. Anyway, we can still learn a little.

Here are the configuration files. Still trying to improve on it.

thanks! im taking look at it…
@waltr sir can you please give me an example configuration? so i will know… thanks!
you mean i need to enter ATIS so that i can get it and or before the end device will send the sampling?
in my end device ATIS is
01 - ?
000E - ?
01 - ?
000A - ?
0233 - ?
with IR and IC value = FFFF.
what does this values mean? i never saw it on the product documentation.
so how will i know if theres any changes? please provide me some sort of examples…that would be great help! thanks a lot!

how will this samples be pass on coordinator? SH,SL of the coordinator = DH,DL end device vise versa. i am not pretty sure about ATIS in coordinator its error.

Ok, this will take be bit of explaining.
Reference the Digi ZB module document # 90000976, for firmware 0x2x41.
Did you read about ‘IC’ command? This sets a mask that enable a change on any of the masked input to ‘force’ (Digi’s term) the module to send the IO pin data. This seems to work exactly like the ‘Change on Interrupt’ on Microchip’s PIC microcontrollers (might be a good read on how this works at the microcontroller code level).

So that’s try an example. You have a coordinator connector to the host (Digi connect unit or PC port). The coordinator is setup all has allowed the router/end device to join.

We have a Router/end device on a RS232 or USB Dev bd connected to a PC port and X-CTU connected to that same port.
On the Router/end XBee device we will use DIO0 (pin 20 on the module) in this example. We want this pin set to input so from X-CTU send the commands ‘+++’ then ‘ATD03’ (page 117 of doc’976). We want to enable the pull-up on DIO0 so send ‘ATPR01’ (page 118) to set the pull-up on only DIO0. Now we want to enable the Change Detect on DIO0. Send ‘ATIC1’ (page 116) so only a change on DIO0 will ‘force’ a data sample.
I don’t believe command ‘IR’ (page 116) is relevant as this creates a sample periodically and could be disabled (value = 0).
Dh and DL (page 113) will need to have the address of the coordinator so be sure these are set to the 64-bit a coordinator address. I don’t suggest setting these to 0xFFFF (broadcast mode).
Now we need to initiate a change on DIO0 so tie a button switch from the XBee modules pin 20 to ground, pin 11. If you have either the RS232 or USB dev bds then one of the buttons is connected between pin 20 and ground.

Check the setup by doing a Remote configuration Modem Read in X-CTU. Scroll through the setting and check the values in DH, DL, D0, PR, IC that they are set as you expect.
Send an ‘IS’ (pages 120 and 77 to 82) command from X-CTU. the return should look something like what you posted. The description is on page 80.

This is a little cryptic until its understood so I annotate what you posted:
01 - # of sample sets- always 1
000E - Digital mask: D1, D2, D3 set as digital input
01 - Analog mask: A0 set as analog input
000A - Digital input sample data. D3 & D1 are logic high, D2 is logic low.
0233 - Analog sample data for A0: value is 0x0233

With the setting I outlined above the return from a X-CTU ‘IS’ command would have D0 set in the digital mask and in the digital sample since it is pulled up to Vcc. Now hold the D0 button to ground D0 and send the ‘IS’ command. bit 0 of the digital sample will now be low (reset or 0).

Ok, we’re done at this end.

Connect to the coordinator to read the data payload (I use a Python print statement within the Digi Dia device driver code). Use whatever will show the data payload from the coordinators serial output. X-CTU would work if the coordinator is connect directly to a PC port.
First try sending a remote ‘IS’ command through the coordinator to the target device we set up. The sample should be the same as the local sample.

Now, push the D0 button on remote. A data sample should be sent to the coordinator and received just like the remote 'IS command. When the button is released another data sample is sent as the name of the ‘IC’ command implies. This is an Interrupt driven sampling and send.

Does this work for you?

Message was edited by: waltr

@waltr: I want to write a simple code to read the sampled data received at the co-ordinator and passed on to PC via serial port. Based on the received data some algorithm has to be executed.
Is this possible using python? I know a bit of C/C++. How difficult/easy is it to start programming in python. Please mention some online resources for the same.

I have just started learning Python so I’m no expert yet but the learning has been going well. It is a very powerful programming language. The first concept is that everything in Python is an object. If you are comfortable with the Object concepts in C++ then Python shouldn’t be too difficult. There are plenty of tutorials and examples on the Web and it is free.

You can write code to read the sampled data and parse out what you need with Python. You could download the Digi Dia and examine the code. There is an ISPARSE function that parses the ‘IS’ raw data sample into individual channels. Digi Dia will run on a PC or a Digi Connect device. Check Digi documentation for more info.

Did you get the Change Detect to work? Is this what you needed?

The change detect is working fine. This is exactly what I wanted. Thanks.

That’s Great Srinivas and you are welcome.