12.07.2015 Views

GM862-GPS Software User Guide - SemiconductorStore.com

GM862-GPS Software User Guide - SemiconductorStore.com

GM862-GPS Software User Guide - SemiconductorStore.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>GM862</strong>-<strong>GPS</strong> <strong>Software</strong> <strong>User</strong> <strong>Guide</strong>1vv0300729 Rev. 4 - 24/01/073.6.2 GPIO pin useAfter having set-up the GPIO pin direction you can query the input status of an INPUT pin or set theoutput status of an OUTPUT pin.3.6.2.1 Querying GPIO pin statusTo query for the pin status:• Send <strong>com</strong>mand AT#GPIO=,2where: is the GPIO pin number at which the <strong>com</strong>mand applies:1 – GPIO1 7 – GPIO72 – GPIO2 8 – GPIO83 – GPIO3 9 – GPIO94 – GPIO4 10 – GPIO105 – GPIO5 11 – GPIO116 – GPIO6 12 – GPIO1213 – GPIO13• wait for response in the format:#GPIO: ,OKwhere: - GPIO direction setting - status of the pin0 - LOW1 - HIGHNOTE: In case the GPIO pin direction is set to ALTERNATE FUNCTION (2), then the reported has no meaning and shall not kept as valid, but shall be threaten as a dummy value.TIP: The query reports depending on the pin direction:- the read pin status in case the direction is input;- the previously set pin status in case the direction is output.In any case, you can know if the pin at the query moment is high or low and the pin direction.For example:1- Let's assume you want to query the GPIO3 pin for its status:<strong>com</strong>mand:AT#GPIO=3,2response:#GPIO: 0,1OKIn this case, the GPIO3 pin was set in input direction and its status has been measured to be HIGH.Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved page 80 of 111

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!