User's Manual

Telit TRIZIUM Product Description
80264ST10007a Rev. 4– 09/09/04
Reproduction forbidden without DAI Telecom written authorization – All Right reserved – Right of modification reserved page 151 of 202
5.6.1.16 #GPIO –General Purpose Input/Output pin control
#GPIO –General Purpose Input/Output pin control
Execute command
Read command
AT#GPIO=<pin>,2
Reports the read value for the 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 pin <dir> is currently set to output;
- no meaning value for the pin GPIO<pin> in the case
the pin <dir> is set to alternate function;
Note for GPIO1: Since the reading is done after the insulating transistor, the reported
value is the opposite of the logic status of the GPIO1 input pin.
Write command
AT#GPIO =<pin>,
<mode>,<dir>
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.
Parameter:
<pin> - GPIO pin number
supported range is from 1 to 7, but GPIO1 is input only and GPIO2
is output only.
<dir> - GPIO pin direction
0 - pin direction in INPUT
1 - pin direction is OUTPUT
2 - pin direction is ALTERNATE FUNCTION *see Note
<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 (see Read command) if <dir> = 0 -
INPUT
- Reports the read value from the input pin (see Read command) if <dir> = 1 -
OUTPUT
- Reports a no meaning value (see Read command) if <dir> = 2 - ALTERNATE
FUNCTION
Note: "ALTERNATE FUNCTION" value is valid only for pins
GPIO6 - alternate function is "Alarm Output" (see command +CALA)
GPIO7 - alternate function is "Buzzer Output" (see command #SRP)
While using the pins in the alternate function, the GPIO read/write access to that pin
is not accessible and shall be avoided.
Note: The GPIO2 is an OPEN COLLECTOR output, the command sets the transistor
base level, hence the open collector output is negated
Test command
AT#GPIO=?