spidev on Raspberry Pi not giving any output with DAC7562EVM

298 views Asked by At

I am attempting to control a DAC7562EVM using a Raspberry Pi. I have connected:

Signal - PI - TI - Signal

MOSI - P1-19 - J2-11 SDI

SCLK - P1-23 - J2-3 SCLK

CEO - P1-24 - J2-1 /SYNCO

GND - P1-25 - J2-4 DGND

Additionally, the JP1 pins are being used to tie /LDAC to ground.

So far, I have used an oscilloscope on the SDI, SCLK, and /SYNC0 pins and can verify that the sync pin does not interrupt the data transmission. Also, I can see sequences of 8 bits being received by the DAC.

The code I have been using is below:

import spidev
spi = spidev.SpiDev()
spi.open(0,0)
spi.mode = 2
spi.max_speed_hz = 1000000
spi.bits_per_word = 8

spi.xfer2([0x20,0x0,0x3]) # Powers on all DACs
spi.xfer2([0x38,0x0,0x0]) # External reference
spi.xfer2([0x30,0x0,0x4]) # /LDAC is low
spi.xfer2([0x17,0x66,0x60]) # Output of 2 V to DAC-A and updates all registers (Vref is 5 V)

spi.close()

I don't understand how I can tell that messages are being sent across, but I'm not getting any discernable output from the DAC. What am I missing?

DAC7562 datasheet: http://www.ti.com/lit/ds/slas719e/slas719e.pdf

DAC7562EVM manual: http://www.ti.com/lit/ug/sbau183a/sbau183a.pdf

I found this answer helpful for the SPI mode, but could not implement the other instructions: SPIDEV on raspberry pi for TI DAC8568 not behaving as expected

1

There are 1 answers

0
Jeremy G On BEST ANSWER

I changed the SYNC0 pin from J2-1 to J2-9 on the TI evaluation board.