@Maximilian-Gerhardt
Thanks alot for the fast response. Will try this out asap. I'll keep it posted! Cheers
Olivier Gallant
@Olivier Gallant
Best posts made by Olivier Gallant
Latest posts made by Olivier Gallant
-
RE: SPI Register readout fails (ADS 1256)
-
SPI Register readout fails (ADS 1256)
Good afternoon,
I've been working for my thesis on a project to do measurements on PV systems. However I am pretty inexperienced in SPI communication and programming in general (it's really not our department). I've been struggeling alot to get a simple readout of for example the status register of the ADC (to verify if the SPI communication and PCB are working properly).
I'm trying to do the readout trough the supported python library and trough the spi-gpio-driver-master.
"
import onionSpi
import timespi = onionSpi.OnionSpi(1, 32766)
spi.sck = 7
spi.mosi = 8
spi.miso = 9
spi.cs = 6
spi.speed = 100000
spi.mode = 0b01
spi.lsbfirst = False
spi.checkDevice()
spi.registerDevice()
spi.setupDevice()
spi.setVerbosity(1)ret = spi.write([0b00010000,0b00000001]) #read command to readout register 0x00
data = spi.readBytes(0x00, 1)
print (data)
"As I expect the omega transfers the command bytes to the ADC trough the MOSI line.
Afterwards I would expect to receive the status register from the ADC altough this does not seem to happen.What am I missing out?
Attached files:
Datasheets ADS1256: http://www.ti.com/lit/gpn/ads1256
Greetings,
Olivier