I´m new here and hope you can help me. A friend gave me a Raspberry Pi with a board that is meant to measure analog Current Values. On this board is a ADE7868. I followed the wiring and figured out that it is connected via SPI.
Now to my question:
I tried to get any response from the board but only get zeros out of it. In the documentation on page 71 is described how to communicate with the chip. What I don't understand is the following sentence:
The read operation using the SPI interface of the ADE7854/ ADE7858/ADE7868/ADE7878 initiate when the master sets the SS/HSA pin low and begins sending one byte, representing the address of the ADE7854/ADE7858/ADE7868/ADE7878, on the MOSI line.
How do I figure out what the address is? Is there any way I can get any response from the Chip? I tried Python and C programs but didn't get anything out.
Here my python code:
import spidev #import spi lib
import time #import sleep
#Spidev object create and open con
spi = spidev.SpiDev()
spi.max_speed_hz = 16384000
spi.mode = 0
spi.cshigh = False
spi.lsbfirst = False
#os.system("gpio -g write 10 0")
answer = spi.xfer2([0b111001011000]) # =E508 = Overvoltage threshold.
#os.system("gpio -g write 10 1")
Obviously since I do not send the address of the chip I don't get any answer. All I get is "". Could you please give me any hints?
Thank you guys so much.