I2C Connection not working with MAX517

Hi all,

I’m working on a project using a MAX517 Digital to Analog converter, however I’m having some trouble getting the I2C connection to work properly. I’m able to pick up that there is an I2C device using the println(I2C.list()) line, however I can’t seem to communicate with the chip. A sample of my code looks like this:

import processing.io.*;
I2C HV;

byte address = 0b01011000 //The address of the device according to the datasheet
byte command = 0b00000000 //the basic command before setting the DAC

void setup(){
 println(I2C.list());
HV = new I2C(I2C.list()[0]);
}

void draw() {
HV.beginTransmission(address);
HV.write(command);
HV.write(255); //trying to output the max 5v
}

I’m still new to the I2C library so I’m not sure if I’ve made a stupid error or am missing something obvious. Below I also have a picture of the schematic used in case it is a wiring issue. Any help on this would be greatly appreciated! I can also provide any additional information if needed!

Schematic (1)|690x457

1 Like

Figured out the reason, everything in the code was correct, the actual MAX517 chip had shorted out and took my Pi’s SCL line with it. After buying a new Pi and MAX517 chip it was able to run perfectly fine. Not sure what caused the short but whatever it was is gone now. Hope this can help somebody else! :grinning:

1 Like