This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AIC3254: writing filter coefficient using Arduino Uno

Hello , , , and all engineers.

I have designed a PPS diagram in which an audio signal will flow  to an enabled Biquad_1 filter before an output. 

After I download the PPS diagram ( Bandpass filter is enabled) to AIC3254, I could hear the audio. Next, I want to change the Biquad_1 filter coefficient on the fly. So I wrote an SPI Arduino code to write to AIC3254. The Arduino code of disabling the Biquad_1 filter was the modification of the first box of an Appendix B in SLAA404C .

 As a result, I just heard a loud noise.

Appendix B was also mentioned about adaptive filter, buffers and to enable DAC. I got confused on how to implement it.

Wasn’t AIC3254's DAC already power-up due to downloaded PPS diagram?

Please guide me on how is the proper way to change the biquad filter coefficient base on my setup? In before, I am successfully control the volume component of PPS using SPI Arduino without configuring processing block.

Thanks.

Kal

  • Hello guys,

    Alhamdulillah, Current progress, I am fully program the AIC3254 using  PGA Analog Bypass script in Control Software. As a result, the SPI implementation using Arduino is success. Next, I tried to include processing block or miniDSP in my arduino code flow, so that I follow Figure 8 (Register Programming Sequence) in SLAA404C. Unfortunately, I am failed to even get an audio playback. I have follow each step of the flow graph in the Figure 8 .

    Is there any precaution step or hint that I should consider to be aware of?

    Thanks and Best Regards,

    KAL

  • Hello guys,

    1. my current progress led me here   and  

    2. whenever I tried the example script that consisting "DAC element" such as in High Performance Stereo Playback, I cant hear any audio.

    3. let say I've program the AIC3254 like the PPS diagram below, how am I suppose to do to power down ADC/DAC before I can write filter coefficient?

    Any help would be much appreciated.

    Thanks and Regrads,

    KAL

  • Hello , and all engineers.

    My current progress, I have found power down script as below.

    ###############################################
    # Power Down Sequence
    ###############################################
    #
    # Select Page 1
    w 30 00 01
    #
    # Power Down HP/LO Amps
    w 30 09 00
    #
    # Select Page 1
    w 30 00 00
    #
    # Power Down DACs
    w 30 3F 14
    w 30 40 0C
    #
    # Power Down ADCs
    w 30 51 00
    #
    ###############################################

    then I did these sequence:  

    1.  download the PPS program  to AIC3254, 

    2. SPI powered down the AIC3254 using Arduino. (success)

    3. SPI write filter coefficient. (failed)

    4. SPI power up DAC. (Failed). I know because I cant hear any audio.

    # Select Page 1
    w 30 00 01
    # De-pop: 16 time constants, 6k resistance
    w 30 14 35
    # Route LDAC/RDAC to HPL/HPR
    w 30 0c 08 08
    # Route LDAC/RDAC to LOL/LOR
    w 30 0e 08 08
    # Power up HPL/HPR and LOL/LOR drivers
    w 30 09 3C
    # Unmute HPL/HPR driver, 0dB Gain
    w 30 10 00 00
    # Unmute LOL/LOR driver, 0dB Gain
    w 30 12 00 00
    # Select Page 0
    w 30 00 00
    # DAC => 0dB
    w 30 41 00 00
    # Power up LDAC/RDAC
    w 30 3f d6
    # Unmute LDAC/RDAC
    w 30 40 00

    5. read filter by spectrum analyzer component. (would do next)

    6. change filter coefficient.(would do next)

    7. Repeat step 5. (would do next)

    Please help me? How to tackle this DAC problem in order to write filter coefficient succesfully and manage to read the filter as spectrum analyzer?

    Thanks and Regards,

    Kal

  • HELLO guys,

    Alhamdulillah I manage to change filter coefficient on the fly (without repeating adc/dac power up/down cycle) using below sequence by refer to page 8, SLAA404C. I Powered up the adc/dac just once.

    I modified the cfg file by enabling adaptive filtering mode just before the DAC/ADC are power up. Then just follow the steps above.

    My next (another nightmare)stage is to translate the AIC3254 CS script to arduino code.

    Thanks and Best Regards, ツ

    Kal

  • Hi Kal,

    Thanks for posting your findings and glad you were able to get it to work.

    Justin