-->
Page 2 of 2

Re: I2C comunicaton

PostPosted: Thu Nov 30, 2017 4:42 pm
by flyboy74
Ok I looked at the datasheet that you posted and it is an I2C chip.

First understand the I2C protocol a little will help even if your not going to use it this time as it will help you understand for the future.

The I2C is used to allow to hang multiple chips all on the 1 data line(much the same as USB). Each chip will have a 7 bit address(known as slave address) then the 8th bit is used to signal whether u want to write to the chip or read from the chip. Then the chip usually has memory addresses (register addresses) and you read or write to these register addresses.

So a write protocol will be send slave_address_byte/write_bit then the resister_address then the data that you want to write to the address

The read protocol will be slave_address_byte/read_bit then the resister_address then read the data from that register

This particular chip also uses a CRC check (rare to see on a IC2 com). It is a way og checking the received data hasn't been corrupted during coms, it is normally used for interent and RF tag and less reliable coms.

Re: I2C comunicaton

PostPosted: Fri Oct 19, 2018 11:50 am
by vdubadub
neuronesp wrote:No.
The component that you refer is a mosfet (output device) that is controlled with a simple high or low signal.
Not a sensor (input device)
See examples.
Read and learn as much as you can.
I am still trying to get my head around I2C.


I think he meant am2320 which is a humidity and temp sensor similar to a dht22 right?