![Telit Wireless Solutions DE910-DUAL Reference Manual Download Page 138](http://html1.mh-extra.com/html/telit-wireless-solutions/de910-dual/de910-dual_reference-manual_1083623138.webp)
DE910-DUAL AT commands reference guide
80392ST10102A Rev.2 – 2012-07-03
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 138 of 261
#I2CWR – Write to I2C
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,20,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=
<sdaPin>, <sclPin>,
<deviceId>,
<registerId>, <len>
This command is used to Read Data from an I2C peripheral connected to module
GPIOs
<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 read data from , range 0..255.
Value has to be written in hexadecimal form (without 0x).
<len>
: number of data to receive. Valid range is 1-254.
Data Read from I2C will be dumped in Hex:
E.g.
AT#I2CRD=2,3,20,10,14
#I2CRD: 00112233445566778899AABBCCDD