[quote=Possum;25688]- that's
PUT the following line as the first line in setup():
Serial.begin(115200)
You can set the baud rate to 9600 but my library has very verbose diagnostics and the higher speed is recommended - change your I2C network sniffer to use the higher baud rate
BTW What Arduino are you using?
Clearly you have I2C comms with the DAC (its address is 48) - so there's no reason why we cant get this puppy to behave :-)[/quote]
Here is the code I am using:
#include "ES9028.h"
ES9028 dac = ES9028("Stereo DAC", ES9028::Stereo);
void configureDAC(ES9028 dac)
{
dac.setSerialBits(ES9028::Bits_16);
dac.setInputSelect(ES9028::InputSelect_SPDIF);
dac.setSPDIFInput(ES9028::SPDIF_Data3);
dac.setFilterShape(ES9028::Filter_Hybrid);
dac.setAutoMute(ES9028::AutoMute_MuteAndRampToGnd);
dac.setAutomuteTime(100);
dac.setGPIO1(ES9028::GPIO_Automute);
dac.setGPIO2(ES9028::GPIO_StandardInput);
dac.setGPIO3(ES9028::GPIO_StandardInput);
dac.setGPIO4(ES9028::GPIO_Lock);
dac.setDpllBandwidthSerial(ES9028::DPLL_Lowest);
dac.setVolumeMode(ES9028::Volume_UseChannel1);
dac.setAttenuation(25);
}
void setup() {
// initialize digital pin LED_BUILTIN as the DAC lock light.
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
delay(1500);
dac.mute();
configureDAC(dac);
delay(500);
dac.unmute();
}
void loop() {
Serial.println("Locked");
digitalWrite(LED_BUILTIN, dac.locked());
delay(100);
}
I still could not get any lock. I have inputs on both SPDIF and I2S. I hope I did not mess up my dac.
What could be wrong with my setup?
Alex