LE910-SKG AT commands reference guide
80437ST10619A Rev.1 – 2014-09-16
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 168 of 273
#I2CWR – Write to I2C
<registerId>, <len>
<sdaPin>
: GPIO number for SDA . Valid range is “any input/output pin” (see
“Hardware User’s Guide”.)
<sclPin>
: GPIO number to be used for SCL. Valid range is “any output pin” (see
“Hardware User’s Guide”).
<deviceId>
: address of the I2C device, without the LSB used for read\write
command, 10 bit addressing supported. Value has to be written in hexadecimal
form (without 0x).
<registerId>
: Register to write data to , range 0..255. Value has to be written in
hexadecimal form (without 0x).
<len>
: number of data to send. Valid range is 1-254.
The module responds to the command with the prompt '
>
' and awaits for the data to
send.
To complete the operation send
Ctrl-Z
char (
0x1A
hex); to exit without writing the
message send
ESC
char (
0x1B
hex).
Data shall be written in Hexadecimal Form.
If data are successfully sent, then the response is OK.
If data sending fails for some reason, an error code is reported.
Example if CheckAck is set and no Ack signal was received on the I2C bus
E.g.
AT#I2CWR=2,3,30,10,14
> 00112233445566778899AABBCCDD<ctrl-z>
OK
Set GPIO2 as SDA, GPIO3 as SCL;
Device I2C address is 0x20;
0x10 is the address of the first register where to write I2C data;
14 data bytes will be written since register 0x10
NOTE: At the end of the execution GPIO will be restored to the original setting
( check AT#GPIO Command )
NOTE: device address, register address where to read from\ write to, and date bytes
have to be written in hexadecimal form without 0x.
AT#I2CWR=?
Test command returns the range of each parameter
.
#I2CRD – Read from I2C
AT#I2CRD=
This command is used to Read Data from an I2C peripheral connected to module
Содержание LE910-SKG
Страница 1: ......