The I2C connections to BIIIpro are the same as for BIIIse - and you need to use an I2C isolator like on DimDims shield
However, in addition you will need to pull the DAC reset pin high to enable it. I use an optocoupler to do this (don't know if DimDims board has something similar). Please read the description on my githuib page here:
https://github.com/possum64/BuffaloDAC The I2S connections are also the same as on the BIIIse - however, you can configure the DAC to use any of 13 possible SPDIF inputs via the setSPDIFInput() func (eg: dac.setSPDIFInput(ES9028::DATA8) makes data input 8 the SPDIF input). You can even use GPIO pins. So its possible to simultaneously have I2S connected and also have multiple SPDIF inputs connected to the unused data and GPIO pins and use the setSPDIFInput() func to switch between them via the Arduino (no Sidecar needed).
I will have to check Russ's firmware code to see which input the BIIISEpro board is using for the SPDIF in (I never use SPDIF so I don't know off the top of my head..).
You can switch input select via the setInputSelect() function - e.g.: switch to SPDIF input by calling dac.setInputSelect(ES9028::InputSelect_SPDIF) or select I2S via dac.setInputSelect(ES9028::InputSelect_Serial)
I have not included the sampleRate() function in the ES9028 library yet but can do so if you need it.
The code to initialise the DAC in stereo I2S is straightforward:
#include <ES9028.h>
ES9028 dac = ES9028("My Stereo DAC", ES9028::Stereo);
void setup() {
// initialize digital pin LED_BUILTIN as the DAC lock light.
pinMode(LED_BUILTIN, OUTPUT);
// wait for SR trident regulators to ramp up to full voltage
delay(1500);
// put code here to pull DAC Reset Pin high to enable the DAC
//...
if (dac.initialise())
{
dac.mute();
// default to I2S input
dac.setInputSelect(ES9028::InputSelect_Serial);
// init GPIOs 1 and 4 to same as BIII
dac.setGPIO1(ES9028::GPIO_Automute);
dac.setGPIO4(ES9028::GPIO_Lock);
//play with settings
dac.setSerialBits(ES9028::Bits_24); // set 24 bit I2S source
dac.setDpllBandwidthSerial(ES9028::DPLL_Lowest);
dac.setFilterShape(ES9028::Filter_Hybrid);
dac.setAutoMute(ES9028::AutoMute_MuteAndRampToGnd);
dac.setAutomuteTime(100);
dac.unmute();
}
}
void loop() {
if (dac.getInitialised())
digitalWrite(LED_BUILTIN, dac.locked()); // turn the LED on if both DACs locked
delay(100);
}
Edited by user Thursday, January 17, 2019 5:21:32 AM(UTC)
| Reason: Not specified