Tool/software:
I am trying to interface a DAC8574 to a Raspberry Pi with a custom HAT that I designed and had produced as a PCB. Here is the section dealing with the DAC8574 and 5.0V Reverence Voltage IC.

I am successfully opening the DAC8574 with
#include <sys/ioctl.h>
int fd_dac;
void DAC_Init(void)
{
int16_t val;
uint8_t writeBuf[5], readBuf[2];
// open device on /dev/i2c-1
if ((fd_dac = open("/dev/i2c-1", O_RDWR)) < 0)
{
printf("Error: Couldn't open I2C device\n");
return ;
}
// connect to dac8574 as i2c slave
if (ioctl(fd_dac, I2C_SLAVE, DAC_Addrs) < 0)
{
printf("Error: Couldn't find device on address!\n");
return ;
}
}
At least I do not get any error messages. Following opening the DAC, I
attempt to send data to DAC 1.
void DAC_Write(uint8_t HighByte, uint8_t LowByte)
{
// set config register and start conversion
writeBuf[0] = 0x10; // config control register
writeBuf[1] = 0x0f;
writeBuf[2] = 0xff; // send 0x0fff to dac-1
// begin conversion
if (write(fd_dac, writeBuf, 3) != 3)
{
printf("Can't write to register 1\n");
return ;
}
return;
}
The data on the oscilloscope appears correct. But no voltage is being output (as seen by the purple trace
attached to dac-1.

Any suggestions would be appreciated,
Kind regards,
David
YouTube "Sailing Solo at 70"

