Post Go back to editing

ADSP21369 / AD1835A L/R Audio Channel Help please?

Hello,

I'm new to the Analog DSPs and this forum.

I' have had a read of the forum however this still will come across as a newbie question i'm sure...

I'm trying to get a Platform running in which i can get single left sample and single right sampe from the ADC in the AD1835.

I have writen a C version of the ASM example of the analog in/out talk thru code.

This works well however I CAN NOT determine if the data is from the left or right channel.

Any ideas???

I have had a run up of the Block Bases but i don't understand the theroy of block based transfers as i just want one sample every sample period.

Is there any pdfs or information about this topic availible online?

Regards

Bart

  • Hi Bart,

              You may use the L_First bit of the SPCTLx register for this purpose. Please refer the HRM for more details. This bit indicates the SPORT on which edge it should start the data transfer.

     

    For I2S mode channel order:

    0 = first data after the falling edge

    1 = first data after the rising edge

     

    In case you are using I2S mode when this bit is cleared the SPORT will start receive the first data after the falling edge. This will be the left channel data. Based on this you can have a software flag to indicate whether the data received it left or right. Or you may use the same buffer in which the locations like 0,2,4 etc will have left channel data and 1,3,5 etc will have right channel data. You may process them independantly.

     

    Best Regards,

    Jeyanthi

     

     

     

  • Hi Jeyanthi,

    I was contemplating doing a software bit toggle however was expecting a status bit somewhere which would save me the bother.

    Any way thank you for your time and help.

    Much appreciated.

    Regards

    Bart

  • Hi Bart,

               If you are looking for a status bit part of the data which will indicate whether it is a right channel data/left channel data then you may use IDP for this purpose. The Input Data ports are the serial slave receivers. You need to connect the BCLK, FS and Data from the ADC to IDP signals. And configure the IDP for 24-bit I2S mode. The LSB 4-bits will have the status of the incoming data where bit 3 indicates whether it is a Left/Right channel. You may need to follow some initial synchronization before enabling the IDP. Please refer the ADSP-21368 HRM for more details.

    Best Regards,

    Jeyanthi

  • Hi Jeyanthi,

    Thank you for the reply,

    I have got the software toggle working and have the data runnning through a FIR filter.

    If i get some time i will have a play with the method you have suggested.

    Many thanks.

    Regards

    Bart