DimDim's ES 9028/9038 DAC Shield For Arduino DUE

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
If you'll be using my shield, you'll need to utilize the I/O available at the MCP_INTERFACE header.

To change the state of any of these pins, you need to use this command:

Code:
mcp.digitalWrite(<pin>, <state>);

So, for example, to set I/O pin 7 to LOW you'd use this command:

Code:
mcp.digitalWrite(7, LOW);

You'll need to use 2 pins.. if you were to use 0 and 1, the commands would look something like this:

For input 1:
mcp.digitalWrite(0, LOW);
mcp.digitalWrite(1, LOW);

For input 2:
mcp.digitalWrite(0, HIGH);
mcp.digitalWrite(1, LOW);

For input 3:
mcp.digitalWrite(0, LOW);
mcp.digitalWrite(1, HIGH);

For input 4:
mcp.digitalWrite(0, HIGH);
mcp.digitalWrite(1, HIGH);

Looking at the Twisted Pear 4:1Mux/Demux, it has both I2S and s/pdif outputs. Which one will you be using?

And also, is your dac ES9018 or ES9028/38 based?
 
That simplifies things a bit.

All you need to do is modify slightly the setInput() function so that the 4 supported inputs correspond to the same physical s/pdif input of the 9038 chip (whichever one it may be..) and add the proper mcp.digitalwrite statements to change the s/pdif inputs on the mux.

For example, assuming that you have your mux connected to the DATA1 pin of the 9038, this piece of code:

Code:
  else if (input == 2)                  // Select s/pdif from DATA1 pin
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA1 pin
      filter = Input[2].filter_val; setFilter();
      IIR = Input[2].IIR_val; setIIR();
      LockSpeed = Input[2].lockspeed_val; setLockSpeed();
      Dither = Input[2].dither_val; setDither();
      JitterElim = Input[2].jitter_elim_val; setJitterElim();
      bypass_osf = Input[2].bypass_osf_val; 
      deemph_bypass = Input[2].deemph_bypass_val; setOSF();
      auto_deemph = Input[2].auto_deemph_val;
      deemph_sel = Input[2].deemph_sel_val; setDeemphasis(); 
    }
  else if (input == 3)                  // Select s/pdif from DATA2 pin
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA2 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA2 pin
      ChangeBit(dac, 0x0B, 5, 1);       // Select s/pdif from DATA2 pin
      ChangeBit(dac, 0x0B, 4, 0);       // Select s/pdif from DATA2 pin
      filter = Input[3].filter_val; setFilter();
      IIR = Input[3].IIR_val; setIIR();
      LockSpeed = Input[3].lockspeed_val; setLockSpeed();
      Dither = Input[3].dither_val; setDither();
      JitterElim = Input[3].jitter_elim_val; setJitterElim();
      bypass_osf = Input[3].bypass_osf_val; 
      deemph_bypass = Input[3].deemph_bypass_val; setOSF();
      auto_deemph = Input[3].auto_deemph_val;
      deemph_sel = Input[3].deemph_sel_val; setDeemphasis();      
    }
  else if (input == 4)                  // Select s/pdif from DATA3 pin
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA3 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA3 pin
      ChangeBit(dac, 0x0B, 5, 1);       // Select s/pdif from DATA3 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA3 pin
      filter = Input[4].filter_val; setFilter();
      IIR = Input[4].IIR_val; setIIR();
      LockSpeed = Input[4].lockspeed_val; setLockSpeed();
      Dither = Input[4].dither_val; setDither();
      JitterElim = Input[4].jitter_elim_val; setJitterElim();
      bypass_osf = Input[4].bypass_osf_val; 
      deemph_bypass = Input[4].deemph_bypass_val; setOSF();
      auto_deemph = Input[4].auto_deemph_val;
      deemph_sel = Input[4].deemph_sel_val; setDeemphasis();        
    }
  else if (input == 5)                  // Select s/pdif from DATA4 pin
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA4 pin
      ChangeBit(dac, 0x0B, 6, 1);       // Select s/pdif from DATA4 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA4 pin
      ChangeBit(dac, 0x0B, 4, 0);       // Select s/pdif from DATA4 pin
      filter = Input[5].filter_val; setFilter();
      IIR = Input[5].IIR_val; setIIR();
      LockSpeed = Input[5].lockspeed_val; setLockSpeed();
      Dither = Input[5].dither_val; setDither();
      JitterElim = Input[5].jitter_elim_val; setJitterElim();
      bypass_osf = Input[5].bypass_osf_val; 
      deemph_bypass = Input[5].deemph_bypass_val; setOSF();
      auto_deemph = Input[5].auto_deemph_val;
      deemph_sel = Input[5].deemph_sel_val; setDeemphasis();      
    }

would become

Code:
  else if (input == 2)                  // Select s/pdif from DATA1 pin, mux input 1
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA1 pin
      mcp.digitalWrite(0, LOW);
      mcp.digitalWrite(1, LOW);
      filter = Input[2].filter_val; setFilter();
      IIR = Input[2].IIR_val; setIIR();
      LockSpeed = Input[2].lockspeed_val; setLockSpeed();
      Dither = Input[2].dither_val; setDither();
      JitterElim = Input[2].jitter_elim_val; setJitterElim();
      bypass_osf = Input[2].bypass_osf_val; 
      deemph_bypass = Input[2].deemph_bypass_val; setOSF();
      auto_deemph = Input[2].auto_deemph_val;
      deemph_sel = Input[2].deemph_sel_val; setDeemphasis(); 
    }
  else if (input == 3)                  // Select s/pdif from DATA1 pin, mux input 2
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA1 pin
      mcp.digitalWrite(0, HIGH);
      mcp.digitalWrite(1, LOW);
      filter = Input[3].filter_val; setFilter();
      IIR = Input[3].IIR_val; setIIR();
      LockSpeed = Input[3].lockspeed_val; setLockSpeed();
      Dither = Input[3].dither_val; setDither();
      JitterElim = Input[3].jitter_elim_val; setJitterElim();
      bypass_osf = Input[3].bypass_osf_val; 
      deemph_bypass = Input[3].deemph_bypass_val; setOSF();
      auto_deemph = Input[3].auto_deemph_val;
      deemph_sel = Input[3].deemph_sel_val; setDeemphasis();      
    }
  else if (input == 4)                  // Select s/pdif from DATA1 pin, mux input 3
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA1 pin
      mcp.digitalWrite(0, LOW);
      mcp.digitalWrite(1, HIGH);
      filter = Input[4].filter_val; setFilter();
      IIR = Input[4].IIR_val; setIIR();
      LockSpeed = Input[4].lockspeed_val; setLockSpeed();
      Dither = Input[4].dither_val; setDither();
      JitterElim = Input[4].jitter_elim_val; setJitterElim();
      bypass_osf = Input[4].bypass_osf_val; 
      deemph_bypass = Input[4].deemph_bypass_val; setOSF();
      auto_deemph = Input[4].auto_deemph_val;
      deemph_sel = Input[4].deemph_sel_val; setDeemphasis();        
    }
  else if (input == 5)                  // Select s/pdif from DATA1 pin, mux input 4
    {
      mcp.digitalWrite(7, LOW);         // Select SPDIF on the Solid State Sidecar
      digitalWrite(SIDECARPIN, LOW);    // Select SPDIF on the Solid State Sidecar (if not using MCP chip)
      ChangeBit(dac, 0x01, 3, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 2, 0);       // Disable auto signal detection
      ChangeBit(dac, 0x01, 1, 0);       // Set input signal type to spdif
      ChangeBit(dac, 0x01, 0, 1);       // Set input signal type to spdif
      ChangeBit(dac, 0x0B, 7, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 6, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 5, 0);       // Select s/pdif from DATA1 pin
      ChangeBit(dac, 0x0B, 4, 1);       // Select s/pdif from DATA1 pin
      mcp.digitalWrite(0, HIGH);
      mcp.digitalWrite(1, HIGH);
      filter = Input[5].filter_val; setFilter();
      IIR = Input[5].IIR_val; setIIR();
      LockSpeed = Input[5].lockspeed_val; setLockSpeed();
      Dither = Input[5].dither_val; setDither();
      JitterElim = Input[5].jitter_elim_val; setJitterElim();
      bypass_osf = Input[5].bypass_osf_val; 
      deemph_bypass = Input[5].deemph_bypass_val; setOSF();
      auto_deemph = Input[5].auto_deemph_val;
      deemph_sel = Input[5].deemph_sel_val; setDeemphasis();      
    }
 
I had been working a lot of hours and left this sit. Recently I found a round tuit and got back on this project.

I haven't been able to get it to work. I assembled a new board and it still can't find DAC. I've tried powering reset on DAC board a couple seconds after powering up, still inop. Anyone have success with DimdDims shield/code on BIII 9028 Pro board? I know Dimitris has a 9028 chip on older BIII board, unsure if that is an issue.


Thx.
 
Hi guys.

I have a problem with Arduino DUE and this superb software.
I dont have a shield.
I connect the 25LC256 EEPROM, im using the big LCD from Sinsmart (dim's requirements)

The compiled code is on my arduino. ( I remove "//" in code (#define BIG) to define a LCD, the WR pin on LCD is connected to 3v3)

The signals from DAC ( SDA,SCL connected )

Without the DAC is only DSD128 on my lcd and nothing happens when i connect the GPIO4 to a PIN3 on arduino the LCD is blank only backlight)

I need to connect encoders and IR to run it? What i need to do? some changes in code? to run it without shield?

When I run the monitor in arduino program it spams some DSD or DPLL I dont know what that is)

Thanks
 
The shield is not required for the code to run and work.. It just helps out a bit with isolation and the connections. You also do not need to have IR & Rot. Enc. connected for it to run.

First thing's first: When you power on the Arduino, what are you getting on your serial monitor? Is the Due "seeing" your DAC? Which dac do you have?
 
Hi Dim ....

I'm using ES9038PRO the arduino don't see my DAC (GPIO4 and others connected)
In the monitor in arduino software i see the arduino smaping some DSD and DPLL code ...
On the LCD i see only DSD128 when I press reset .... the same and the same.


Without DAc I see this ... and nothing happens. When I connect the DAC (GPIO4) the LCD stays blant only backlight.

dsd | Fotosik.pl
 
Last edited:
It looks like your TFT is wired correctly and functioning, so that's good.

But for starters you need to get the controller to see your dac.

The reason you're having problems is most likely the Reset pin of the 9038. You need to pull this pin high (connect to +3.3V through a ~10K resistor) and then re-test your controller.
 
Ok then, so you have 4.3 inch LCD, 480x272, with SSD1963 controller.


EEPROM should be connected also on Arduino SDA and SCL pins, but as I can say in the DimDim's code, you can set its I2C adress to 0x50. As I remember, EEPROM A0, A1 and A2 pins should be connected to GND for 0x50, but I am not so sure, you have to check its datasheet.
 
Yeap I check in datasheet...

I have some questions abaut this software.

Volume/input encoder is working, but the second one wont work at all ...
When i long press Volume, soft is restarting.

How to activate 2nd encoder/ How enter the menu and change filters etc.?
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.