Hello,
I'm trying to evaluate the DAC80004EVM and connect it to RPI3 module to SPI0.
I use python to control the DAC80004 but w/o success.
I'm not using signals CLR~ nor LDAC~
My code below:
import spidev
import time
import os,sys
spi = spidev.SpiDev()
spi.open(0,0) # open bus 0, CE0.
spi.max_speed_hz = 976000
# CLR~ =1 => JP7=open
# LDAC~ =0 => Jp6=short
resp = spi.xfer([0x08,0x00,0x00,0x0f]) # Enable SDO
resp = spi.xfer([0x04,0xf0,0x00,0x0f]) # Power on
resp = spi.xfer([0x06,0xf0,0x00,0x0f]) # Update control by the 32 falling edge of sck
resp = spi.xfer([0x05,0x00,0x00,0x00]) # Cler Mode Reg zero scale
resp = spi.xfer([0x1d,0x00,0x00,0x00]) # Read Status Reg
resp = spi.xfer([0x0e,0x00,0x00,0x00]) # print('NOP Command')
print ('Status = {:02x}{:02x}{:02x}{:02x}'.format(resp[0],resp[1],resp[2],resp[3]))
resp = spi.xfer([0x14,0x00,0x00,0x00]) # Read Power Reg
resp = spi.xfer([0x0e,0x00,0x00,0x00]) # print('NOP Command')
print ('Power = {:02x}{:02x}{:02x}{:02x}'.format(resp[0],resp[1],resp[2],resp[3]))
resp = spi.xfer(0x03,0x0f,0xff,0x00) # Write to channel A the value 0xfff0
The Output of the device stuck at zero.
Please help.
Regards,
Asher