Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
© 2011 Digi International, Inc.
     95
8. XBee Analog and Digital IO Lines
XBee ZB firmware supports a number of analog and digital IO pins that are configured through software commands. 
Analog and digital IO lines can be set or queried. The following table lists the configurable IO pins and the corresponding 
configuration commands. 
IO Configuration
To enable an analog or digital IO function on one or more XBee module pin(s), the appropriate configuration 
command must be issued with the correct parameter. After issuing the configuration command, changes must be 
applied on the module for the IO settings to take effect.
Pull-up resistors can be set for each digital input line using the PR command. The PR value updates the state of all 
pull-up resistors.
IO Sampling 
The XBee ZB modules have the ability to monitor and sample the analog and digital IO lines. IO samples can be read 
locally or transmitted to a remote device to provide indication of the current IO line states. (Only API firmware 
devices can send remote IO sample data out their UART.) 
There are three ways to obtain IO samples, either locally or remotely:
Module Pin Names Module Pin Numbers Configuration Command
CD/DIO12
4
P2
PWM0/RSSIM/DIO10
6
P0
PWM/DIO11
7
P1
DIO4
11
D4
CTS/DIO7
12
D7
ASSOC/DIO5
15
D5
RTS/DIO6
16
D6
AD3/DIO3
17
D3
AD2/DIO2
18
D2
AD1/DIO1
19
DI
AD0/DIO0
20
D0
Pin Command Parameter
Description
0
Unmonitored digital input
1
Reserved for pin-specific alternate functionalities
2
Analog input, single ended (A/D pins only)
3
Digital input, monitored
4
Digital output, default low
5
Digital output, default high
6-9
Alternate functionalities, where applicable