Rev 1.0
1/27/14
20
20
Reference Guide
Interfaces
•
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
[1]
By default, and when the modem has been reset, both GPIOs are
configured as inputs. The AT command
AT+WIOM
must be used to change
this configuration. Refer to documents [3] AT Commands Interface Guide
[2]
Customer Release Notes for Firmware 7.52 A1
for more information regarding this AT command.
3.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.
3.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.
Refer to the AT Commands Interface Guide at
http://www.usr.com/support/3500
for
more information regarding AT commands.
Note:
The
AT+WIOW
and
AT+WIOR
commands will automatically set the GPIO to the desired mode. For
example,
AT+WIOW=42,1
will set GPIO42 to output mode and in High state.