Bi-directional Analog I/O Line Passing

I am having a problem setting up bi-direction analog I/O line passing. The RSSI doesn’t switch to the PWM0 output when configured to do so.

I started with this configuration for bi-directional digital and single direction analog communication. The analog is sent from the Remote module’s ADC1 port to the PWM1 port of the Base module. The digital signals are each uni-directional, some going one way and some the other way. This configuration works well:

VR 10E6 same for both modules
MY 1111 Remote module’s address
DL 2222 Base module’s address
IA 2222 bind Base outputs to Remote inputs
IR A4 164 mS sample rate
IT 5 5 samples per xmission
IU 1 enable outputs
D0 0 disabled
D1 2 ADC input 1
D2 3 digital input
D3 3 digital input
D4 5 digital output
P0 1 RSSI output
P1 0 disabled

MY 2222 Base module’s address
DL 1111 Remote module’s address
IA 1111 bind Remote outputs to Base inputs
IR A4 164 mS sample rate
IT 5 5 samples per xmission
IU 1 enable outputs
D0 0 disabled
D1 0 disabled
D2 5 digital output
D3 4 digital output
D4 3 digital input
P0 1 RSSI output
P1 2 PWM output 1

Then I made these changes hoping to get analog both ways:

P0 2 PWM output 0

D0 2 ADC input 0

The Remote module still outputs RSSI instead of the converted analog output PWM0. [u]Does anyone have an idea why this doesn’t work?[/u]

From the product manual:

“The default setup is for outputs not to be updated, which results in the I/O data being sent out the UART (refer to the IU (Enable I/O Output) command).”

So try setting UI to 0 on each module, and see what happens.

Can you let us know whether it works? If it does, I’ll clarify the point in the cookbook. If it doesn’t, I’ll have another think…

Edit: I can’t see why you would set IT to 55 for an application like this. It will wait for 13.94 seconds before sending a packet, which will contain 85 (decimal) samples. So only the last sample will actually matter and the other 84 are wasted. You’ll see much more responsiveness with IT set to 1.


Thank you, that was it. I was unclear if the output pin routing was also controlled by IU when enabling/disabling the UART. But now it seems obvious.

Parameter IT was set to 5, not 55 as the post shows. I used another editor for that post and spaces were deleted between the two "5"s when copying to the forum. The second “5” is just part of the comment.

Thanks for your advice John. I’m new to XBEE and people like you who can answer a quick question can save hours of work.

Well, thanks for the compliment! I’m glad it helped.

And now that I look again, the space wasn’t deleted - it was just rather narrow in my browser and I didn’t spot it. Still, any value of IT other than 1 doesn’t seem useful when doing I/O line passing.

And by the way - welcome to the forums!