Need to control ADAU1452 from its Evaluation Board using uC I2C connected to slave port from the 10Way header the eeprom will be in selfboot

Hello I am working on a new design that requires a microcontroller I2C interface to control the ADAU1452. The ADAU1452 start up program comes from EEprom and the uC will be used to manipulate the parameteres of the different components of Sigmastudio program.

-To start I purchased the ADAU1452EVAL BOARD and the microcontroller is an AVR Atmega128A.

-Created the project in Sigma Studio 4.5.

The test program is very simple, I download the program for selfboat to the EEPROM using the USBi and its booting up properly I can listen to the audio signal.  

My problem is that the commands sent from my uC to slave I2C port of the ADAU1452 is not working.

1.- On the 10Way header, I fixed the pins 1-7(SCL) and 3-5(SDA), also connected on pin 10 GND. SCL is 40K ( I read the recommendation is to work bellow 400K) and I am sending via I2C the info I programmed, I checked with an oscilloscope the I2C DATA and its what I programmed

i2c_start();
i2c_write(0x70); //DSP Address
i2c_write(0x16); //Gain Control Slew address avoids pop sound
i2c_write(0x04); //Cantidad Bytes 4
i2c_write(0x00); // 4 byte de data
i2c_write(0x00);
i2c_write(0x20);
i2c_write(0x8A);
i2c_stop();

i2c_start();
i2c_write(0x70); //DSP Address
i2c_write(0x15); //Gain Control Address
i2c_write(0x04); //Byte Qty 4
for (itemp=0;itemp<4;itemp++) //data received from Computer
     {
      i2c_write(Arreglo_Serial[itemp]);
     }
i2c_stop();

2.- I believe that address of DSP and Gain control are correct: The picture shows when DSP is being used via ISP using USBi, thats why address shows 0x00, snapshot took from capture window:

3.- I  did not use on the 10way header the pins 6 (DSP Reset), 8 (MOSI), pin 9 (/SS) . Not sure if this is why its not working. DSP Reset is clear the function, but the other 2 pins are not that clear for me.

4.- Do I have to configure a Dip Switch?

Thank you

Parents
  • I have integrated in my board the 2 pin controls /SS and MOSI to the 10 way header, I have them both on Low , so address is 0x70 for Write and 0x71 for read. Also modified my code, 

    i2c_start();
    i2c_write(SLA_W); //DSP Address

    i2c_write(0x00);
    i2c_write(0x16); //Gain Control Slew address avoids pop sound

    i2c_write(0x04); // Bytes 4
    i2c_write(0x00); // 4 byte de data
    i2c_write(0x00);
    i2c_write(0x20);
    i2c_write(0x8A);

    i2c_stop();

    i2c_start();
    i2c_write(SLA_W); //DSP Address

    i2c_write(0x00);
    i2c_write(0x15); //Gain Control Address

    i2c_write(0x04); //Byte Qty 4

    for (itemp=0;itemp<4;itemp++)
    {
    i2c_write(Arreglo_Serial[itemp]);
    }
    i2c_stop();

    The ADAU1452 is not responding to the commands. I have revised the signal I2C in this oscilloscope, look fine, its according to what I programmed.

    Are there any suggestions?

  • Hello its finally working.

    The Sigma Studio project is shown in 2 captures

     

    Hardware  Configuration:

     

     

    Schematic configuration:

     

     

     

    The code written for I2C communication in Code Vision, Atmel AVR Atmega128A.

    Microcontroller I2C was connected to the Slave Port of the ADAU1452, with the uC I set to low /SS and MOSI (Pins 33 and 32 of the ADAU1452), this while DSP Reset (Pin 24) was in 0, after 500msec of delay I set pin DSP reset to 1.

    I did have to use pins /SS and MOSI. This way DSP address is 0x70. See bellow register. You can find it in the datasheet of the ADAU1452 page 44.

      

    I had a mistake in the I2C transmit data, so to make it simpler it’s as follows:

    DSP address (1byte)

    Component address (2Bytes)

    Data (depends of the type of the component), data format is 8_24.

     

    Please observe the Sigma Studio Project

    Only have a gain control component, in the Capture Window I saw the address, its 0x0015.

    Before changing the coefficient (parameters) of the Gain Control it is recommended to set the Gain Slew to 0x0016 to 0x00,0x00,0x20,0x8A, this avoids pop sounds.

     

    Where can you see the address of each component in the Project?  Look at the Sigma Studio Project in the Capture Window.

     

    The access to all the pins was thru the 10pin header of the Eval1452 dev board

     

     

     The code that works:

    i2c_start();

    i2c_write(0x70);         //DSP Address

    i2c_write(0x00);   

    i2c_write(0x16);         //Gain Control Slew address avoids pop sound                                                                                   

    i2c_write(0x00);         // 4 byte de data

    i2c_write(0x00);

    i2c_write(0x20);

    i2c_write(0x8A);                           

    i2c_stop();

                   

    i2c_start();

    i2c_write(0x70);         //DSP Address

    i2c_write(0x00);   

    i2c_write(0x15);         //Gain Control Address                                            

          

     for (itemp=0;itemp<4;itemp++)

            {            

              i2c_write(Arreglo_Serial[itemp]);          

             } 

     i2c_stop();

Reply
  • Hello its finally working.

    The Sigma Studio project is shown in 2 captures

     

    Hardware  Configuration:

     

     

    Schematic configuration:

     

     

     

    The code written for I2C communication in Code Vision, Atmel AVR Atmega128A.

    Microcontroller I2C was connected to the Slave Port of the ADAU1452, with the uC I set to low /SS and MOSI (Pins 33 and 32 of the ADAU1452), this while DSP Reset (Pin 24) was in 0, after 500msec of delay I set pin DSP reset to 1.

    I did have to use pins /SS and MOSI. This way DSP address is 0x70. See bellow register. You can find it in the datasheet of the ADAU1452 page 44.

      

    I had a mistake in the I2C transmit data, so to make it simpler it’s as follows:

    DSP address (1byte)

    Component address (2Bytes)

    Data (depends of the type of the component), data format is 8_24.

     

    Please observe the Sigma Studio Project

    Only have a gain control component, in the Capture Window I saw the address, its 0x0015.

    Before changing the coefficient (parameters) of the Gain Control it is recommended to set the Gain Slew to 0x0016 to 0x00,0x00,0x20,0x8A, this avoids pop sounds.

     

    Where can you see the address of each component in the Project?  Look at the Sigma Studio Project in the Capture Window.

     

    The access to all the pins was thru the 10pin header of the Eval1452 dev board

     

     

     The code that works:

    i2c_start();

    i2c_write(0x70);         //DSP Address

    i2c_write(0x00);   

    i2c_write(0x16);         //Gain Control Slew address avoids pop sound                                                                                   

    i2c_write(0x00);         // 4 byte de data

    i2c_write(0x00);

    i2c_write(0x20);

    i2c_write(0x8A);                           

    i2c_stop();

                   

    i2c_start();

    i2c_write(0x70);         //DSP Address

    i2c_write(0x00);   

    i2c_write(0x15);         //Gain Control Address                                            

          

     for (itemp=0;itemp<4;itemp++)

            {            

              i2c_write(Arreglo_Serial[itemp]);          

             } 

     i2c_stop();

Children
No Data