Hi Again TOM. no it doesn't work.
i used the i2c scanner this is the first step. i got the 0x1C device address and all good.
i checked all the pins and voltages everything is fine.
but am not producing anything on the output pin :s
let's say now i work only on the DAC and i use the example which groundFungus provided.
I still don't get anything on the output pin
This code what groundFungus provided
#include <Wire.h>
#define MAX5217 0x1C
unsigned int value_16bit = 10;
void setup()
{
Wire.begin();
Wire.beginTransmission(0b00011111);
delayMicroseconds(10);
Wire.write(0b00001000);
Wire.write(0x00);
delayMicroseconds(10);
Wire.endTransmission();
}
void loop() {
// for (int i = 0; i = 65000; i++) {
//if (value_16bit == 0 ) { value_16bit =10;}
// value_16bit = value_16bit - 1;
value_16bit = 1000; //dac output value
byte dac_low = byte(value_16bit & 0x00FF);
byte dac_high = byte((value_16bit & 0xFF00) >> 8);
Wire.beginTransmission(MAX5217);
delayMicroseconds(10);
Wire.write(0x01);
delayMicroseconds(10);
Wire.write(dac_high);
delayMicroseconds(10);
Wire.write(dac_low);
delayMicroseconds(10);
Wire.endTransmission();
delay(3000);
value_16bit = 0; //dac output value
dac_low = byte(value_16bit & 0x00FF);
dac_high = byte((value_16bit & 0xFF00) >> 8);
Wire.beginTransmission(MAX5217);
delayMicroseconds(10);
Wire.write(0x01);
delayMicroseconds(10);
Wire.write(dac_high);
delayMicroseconds(10);
Wire.write(dac_low);
delayMicroseconds(10);
Wire.endTransmission();
delay(3000);
}