2 setting gpio pin output status, At#gpio=<pin>,<value>,1<cr – Rainbow Electronics GM862-GPS User Manual

Page 83

Advertising
background image





GM862-GPS Software User Guide

1vv0300729 Rev. 5 - 05/07/07

Reproduction forbidden w ithout Telit Communications S.p.A. w ritten authorization - All Rights Reserved

page 83 of 120

2- Let's assume you want to query the GPIO4 pin for its status:
command:
AT#GPIO=4,2<cr>
response:
#GPIO: 1,0
OK
In this case, the GPIO4 pin was set in output direction and its status is LOW.

3- Let's assume you want to query the GPIO6 pin for its status:
command:
AT#GPIO=6,2<cr>
response:
#GPIO: 2,0
OK
In this case, the GPIO6 pin was set in "alternate function" direction and therefore works as alarm
output. The reported status = LOW has no meaning.


3.6.2.2 Setting GPIO pin output status

To set the pin status (when pin is set as OUTPUT):

Send command

AT#GPIO=<pin>,<value>,1<cr>

where:
<pin> is the GPIO pin number at which the command applies:

7 – GPIO7

2 – GPIO2

8 – GPIO8

3 – GPIO3

9 – GPIO9

4 – GPIO4

10 – GPIO10

5 – GPIO5

11 – GPIO11

6 – GPIO6

12 – GPIO12

13 – GPIO13


<value> is the pin value to be set and can be:

0 – LOW
1 – HIGH

wait for response

OK


For example:
1- Let's assume you want to set the GPIO3 pin HIGH:
command:
AT#GPIO=3,1,1<cr>
response:
OK

Advertising