Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

I2C Address

The ADC Pi is an Analogue to Digital converter for the Raspberry Pi

19/06/2020

Posted by:
Bertjan

Bertjan Avatar

when i look at the datasheet of the MCP3424, i see that the address is 1101 A2 A1 A0 R/nW. So for reading at adr0=0 and adr1=0 it will be 1101 0001 = 0xD1. But in all the examples there is 0x68. What am i missing?

19/06/2020

Posted by:
andrew

andrew Avatar

I2C addresses are normally shown as a 7-bit number with the end read/write bit omitted.

In the case of the MCP3424, the address 1101 A2 A1 A0 would be 0b1101000 or 0x68 when A0, A1 and A2 are connected to ground.

Most I2C libraries and programs like i2cdetect will use the 7-bit number so for example with the command "sudo i2cdetect -y 1" using the ADC Pi you get the following response.


     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


We have a tutorial in our knowledge base that explains how i2c addresses work, you can find it in our Knowledge Base An introduction to the I²C protocol.

22/06/2020

Posted by:
Bertjan

Bertjan Avatar

thank you for the explanation. but can you tell me where the read/write bit is in this?

22/06/2020

Posted by:
andrew

andrew Avatar

The read/write bit comes at the end of the 7-bit address to make an 8-bit byte. With the read/write bit included the address 0x68 would read as 0xD0 or 0xD1 in a logic analyser.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout