0

I am working on 3-phase power meter development.
I designed the hardware using ADE7880. But due to component shortage, the lead time for purchasing ADE7880 was 2~3 weeks. So I decided to use ADE7878, which was quicker to purchase.

I thought there would be no issue for driving ADE7880 or ADE7878, because it was just I2C communication. But I faced to an issue immediately after started working with the prototype. I could not find the I2C address information in datasheets.

After some searching, I found a similar project SmartPi and there was the I2C address on Line 44 of ade7878.go file.
It was 0x38.

I also found a forum thread "Reading ADE7880 Registers with Arduino using I2C".
Here, the address of ADE7880 was also 0x38.

I scanned the I2C bus and I could see two addresses:

Address Device
0x48 Is this ADE7878?
0x68 Correct result from DS1307 RTC on my board

I attached some pictures for reference.
So, my questions are:

  • What is the correct I2C address of these chips and where is it documented?
  • If it was 0x38 as I found on third-party sources, what is possible reason of my i2cdetect's result - 0x48?
Prototype Closer look of AFE i2cdetect result
pcbcrew-prototype ade7878 i2cdetect
PCBCrew Engineer
  • 1,469
  • 1
  • 13
  • 2
    Datasheet page 69 says "The most significant seven bits of the address byte constitute the address of the ADE7854/ADE7858/ADE7868/ADE7878 and they are equal to 0111000b." It is also shown in Figures 86 and 87. – Ben Voigt Apr 10 '23 at 21:03
  • Yes, I saw it already when I was designing. And I annotated like "I2C address is 0x70" on schematics, for my own reference. However, the source code and forum threads I mentioned were using different address - `0x38`. – PCBCrew Engineer Apr 10 '23 at 21:06
  • 2
    That *is* 0x38. And "I saw it already when I was designing" totally contradicts your question "I could not find the I2C address information in datasheets" – Ben Voigt Apr 10 '23 at 21:07
  • Sorry for not writing clearer. I meant except those figures, there were no written definition of I2C addresses. Anyway, it was I who did not read the datasheet more carefully. Thank you a lot! – PCBCrew Engineer Apr 10 '23 at 21:14

2 Answers2

4

The reason you see 0x38 and not 0x70 is because the I2C functions for Read and Write take an address, bit-shift one to the left, and add a 1 or a 0 for the Read/Write bit. So you pass the I2C-Write function address 0x38, it shifts one bit to the left (0x38 < 1 = 0x70) and sets the 0th bit to 0. You pass the I2C-Read function address 0x38, it shifts one bit to the left and sets the 0th bit to 1, thus technically an I2C Read command uses the slave address 0x71. So yes, the address is 0x70/0x71, but you will need to use 0x38 in your code for most I2C libraries.

InBedded16
  • 827
  • 2
  • 12
1

That's datasheet is quite explicit: the i²c address is 0x70.

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237