Rainbow Electronics GM862-QUAD-PY User Manual

Page 259

Advertising
background image




AT Commands Reference Guide

80000ST10025a Rev. 5 - 09/07/08

Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved

page 259 of 434

#GPIO - General Purpose Input/Output Pin Control

SELINT 0 / 1

Example

AT#GPIO=3,0,1
OK

AT#GPIO=3,2
#GPIO: 1,0
OK

AT#GPIO=4,1,1
OK
AT#GPIO=5,0,0

OK
AT#GPIO=6,2
#GPIO: 0,1

OK


#GPIO - General Purpose Input/Output Pin Control

SELINT 2

AT#GPIO=[<pin>,
<mode>[,<dir>]]

Execution command sets the value of the general purpose output pin
GPIO<pin> according to <dir> and <mode> parameter.
Not all configuration for the three parameters are valid.

Parameters:
<pin> - GPIO pin number; supported range is from 1 to a value that

depends on the hardware.

<mode> - its meaning depends on <dir> setting:
0 - no meaning if <dir>=0 - INPUT
- output pin cleared to 0 (Low) if <dir>=1 - OUTPUT
- no meaning if <dir>=2 - ALTERNATE FUNCTION
1 - no meaning if <dir>=0 - INPUT
- output pin set to 1 (High) if <dir>=1 - OUTPUT
- no meaning if <dir>=2 - ALTERNATE FUNCTION
2 - Reports the read value from the input pin if <dir>=0 - INPUT
- Reports the read value from the input pin if <dir>=1 - OUTPUT
- Reports a no meaning value if <dir>=2 - ALTERNATE FUNCTION
<dir> - GPIO pin direction
0 - pin direction is INPUT
1 - pin direction is OUTPUT
2 - pin direction is ALTERNATE FUNCTION (see Note).

Note: when <mode>=2 (and <dir> is omitted) the command reports the
direction and value of pin GPIO<pin> in the format:

#GPIO: <dir>,<stat>

where:
<dir> - current direction setting for the GPIO<pin>
<stat>

logic value read from pin GPIO<pin> in the case the pin <dir> is set
to input;

logic value present in output of the pin GPIO<pin> in the case the

Advertising