User guide

WA_DEV_FEX20_UGD_002 Rev 004 March 08, 2011 37
Fastrack Xtend User Guide
Interfaces
Figure 14. Equivalent circuit of V
OH
, Vref > 2.8V
The GPIO pin is mainly used to:
Act as a switch for a transistor when the GPIO is configured as output.
Act as a status reading when the GPIO is configured as input.
The GPIOs may be controlled with the following AT commands:
AT+WIOW for write access to the GPIO value, when the GPIO is used as an output
AT+WIOR for read access to the GPIO value, when the GPIO is used as an input
By default, and when the Fastrack Xtend has been reset, both GPIOs are configured as inputs. The
AT command AT+WIOM must be used to change this configuration. Refer to document [7] Firmware
7.4a AT Commands Manual (Sierra Wireless Software Suite 2.31)/Firmware 7.4 AT Commands
Manual (Sierra Wireless Software Suite 2.30) for more information regarding this AT command.
5.1.1.1.1. Setting the GPIO as an Output
Refer to the following example for how to configure the GPIO as an output.
Enter the following commands:
AT+WIOM=1,“GPIO21”,1,0 this command activates GPIO21 as an
output and sets it at a low level.
AT+WIOW=“GPIO21”,1 this command sets the output level of
GPIO21 to HIGH.
5.1.1.1.2. Setting the GPIO as an Input
Refer to the following example for how to configure the GPIO as an input.
Enter the following commands:
AT+WIOM=1,“GPIO21”,0 this command activates GPIO21 as an input.
AT+WIOR=“GPIO21” this command reads the GPIO21 level and
returns the value “1” which represents a HIGH level.
Pull the GPIO21 pin to GND, and read again. The return value should now be “0” which
represents a LOW level.