Announcement

Collapse
No announcement yet.

uLCD-43PT and ESS9018 DAC

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • uLCD-43PT and ESS9018 DAC

    Dear All,

    I am trying to port a working code for Arduino on the 4D-u4LCD43-PT display, to use the display as I2C controller for an ESS9018 DAC. so far I did not have success in the communication.
    The Arduino code is the following:

    void writeSabreReg(byte regAddr, byte regVal)
    {
    Wire.beginTransmission(0x48); // Hard coded to the the Sabre/Buffalo device address for stereo
    // or mono left. For stereo same as writeSabreReg()
    Wire.write(regAddr); // Specifying the address of register
    Wire.write(regVal); // Writing the value into the register
    Wire.endTransmission();
    }


    func WriteSabreReg(var regAddr, var regVal )

    I2C_Start(); // Generate Start condition
    I2C_Write(0x48); // send slave address
    I2C_Write(regAddr); // select the register
    I2C_Write(regVal); // save the value in selected register
    I2C_Stop();

    endfunc

    It looks straight forward, but it does not work. what am I doing wrong ?

    Thanks,

    Davide

  • #2
    To be clear, the Arduino code works, the second one does not.

    D,

    Comment


    • #3
      Hi Davide,

      The I2C code looks right.
      Did you initialise I2C before calling the I2C write function.

      eg. I2C_Open(I2C_MED); // Open the I2C port in 400KHz mode.

      Also

      Our chips use the I2C address left shifted 1 bit (so the RW bit is orred onto the end), I'm not sure about Arduino, but looking at the ess9018 datasheet they specify it as 0x90 and that appears left shifted, so the address should be 0x90.

      Paul

      Comment

      Working...
      X