Replies: 10
Views: 218
Part Number: TLV320DAC3203
Dear sir,
I am a new user for audio codec TLV320DAC3203 using, we are using TLV320DAC3203 (by pin 6 for data and pin 9 for clock) to collect ultrasonic signal (20K~80KHz) from PDM microphone SPH0641LU4H-1 and use TLV320DAC3203 by I2S interface to connect to Micro-controller, how can I transfer the PDM data signal to PCM data signal to micro-controller by using the Decimation filters in TLV320DAC3203? The ultrasonic signal frequency from SPH0641LU4H-1 can be 20K~80K. Which filter I should use for and could you show some example code to me and see how to fix this issue? Thanks.
Best Regards!
Tyler
Hello, Tyler!
Welcome to E2E and thank you for your interest in our products!
In order to configure the TLV320DAC3203 you would require to configure the PLL and clock dividers to get at least 96KHz of sampling rate. In addition, you may select decimation filters A and B with an AOSR = 64 or decimation filter C with and AOSR = 32. These configuration are specially designed for high sampling rates. So, ultrasonic signals could be supported.
I attached an example that takes the digital microphone signal from the same pins that you require. It converts the PDM signal into I2S data. Please take a look at it and let me know if you have additional questions or comments.
Digital Microphone 96KHz.txt
I hope this helps!
Best regards,Luis Fernando Rodríguez S.
In reply to Luis Fernando Rodríguez S.:
Hi Luis Fernando Rodríguez S.
Sorry to response a little late, just came back to office. Thank you very much for your very useful information. And for this digital microphone 96KHz example code you attached, I have another several questions which are not clear to me, sorry for that, I am a new comer for this codec TLV320DAC3203.
1. From current ultrasonic microphone Spec, we will get the maximum frequency 80KHz signal(the signal frequency range is 20KHz~80KHz), that means we have to set at least 192KHz (WCLK) of sampling rate in TLV320DAC3203, not 96KHz, right?
2. If we set the 192KHz sampling rate in TLV320DAC3203, we also need to select the decimation filters A and B with an AOSR = 64 or decimation filter C with and AOSR = 32 like this or we have to change to other AOSR value? Could you help to point out this?
3. And for below filter in example code, it seems that it is 80Hz High-pass first order Butterworth2 filter. But for me as we will get the 20KHz~80KHz frequency signal from this digital microphone, how should I design this filter? Yes, I saw you set the AOSR=64 in the example code, but this only setting AOSR=64 is not enough for my design, we have to design a filter which meet 20KHz~80KHz frequency signal, right?
################################################# High-pass first order Butterworth2 filter,# fc = 80 Hz################################################# Write to Buffer A:## BIQUAD A, Left Channel (Page 8, Register 36, C7-C11)w 30 00 08w 30 24 7E F8 EB 00 81 07 15 00 7E F8 EB 00 7E F7 DD 00 82 0C 0C 00## BIQUAD A, Right Channel (Page 9, Register 44, C39-C43)w 30 00 09w 30 2c 7E F8 EB 00 81 07 15 00 7E F8 EB 00 7E F7 DD 00 82 0C 0C 00## Write to Buffer B:## BIQUAD A, Left Channel (Page 26, Register 36, C7-C11)w 30 00 1Aw 30 24 7E F8 EB 00 81 07 15 00 7E F8 EB 00 7E F7 DD 00 82 0C 0C 00## BIQUAD A, Right Channel (Page 27, Register 44, C39-C43)w 30 00 1Bw 30 2c 7E F8 EB 00 81 07 15 00 7E F8 EB 00 7E F7 DD 00 82 0C 0C 00################################################
Sorry for my so many questions, although I am new, but I have to find out how I can TLV320DAC3203 work correct with MCU from digital microphone signal from 20KHz~80KHz.
We wish we can get the help from you soon. Have a good weekend!
In reply to user5369141:
Hi, Tyler,
You are right, a 96KHz sampling rate won't be capable to sample correctly the ultrasonic signals at that frequency. So, the 192KHz clock will be required.
I would recommend to select the Decimation filter C with an AOSR = 32. This configuration is specific for sampling rates of 192KHz.
The digital filters included in the code that you mentioned are only used to eliminate the DC components that may be included in the digital microphone signal. We recommend to have this filter in your configuration. If you are looking to isolate the specific range of frequencies too, you may include more filters in you signal path. We recommend to take a look at our TI Biquad Coefficient Calculator Tool: http://www.ti.com/tool/COEFFICIENT-CALC. This tool helps to get the coefficients that may be included in you configuration.
Please feel free to ask for additional information or comments. We will be glad to help you.
Dear Luis Fernando Rodríguez S.
Sorry, we tried the feedback your posted in Jan 15 again and found we also met issue here, we try to get that signal from digital microphone SPH0641LU4H-1, if the signal frequency is below 20KHz, we can get the correct I2S data from MCU. But when the signal is larger 20KHz( We test in 40KHz) from digital microphone, it seems that we can not get the relative frequency I2S data( about 40KHz) from TLV320DAC3203 in MCU, I don't know what wrong with this. But we saw the below information in TLV320DAC3203 design reference guide in page 32. And you mentioned in 1st feedback for my question, TLV320DAC3203 will support ultrasonic signal (>20kHz), and our digital Microphone is SPH0641LU4H-1, it can get the ultrasonic signal up to 80KKHz.
Could you double confirm whether TLV320DAC3203 ADC can support ultrasonic signal (>20kHz) or not? If TLV320DAC3203 is really supporting ultrasonic signal (20KHz~80KHz from microphone), what is wrong with us in setting? We see TI has a similar design, using the same ultrasonic microphone SPH0641LU4H-1, but the codec is TLV320AIC3256, the design reference file is TIDA-01236. This is very important for us, hope to get your early feedback. Thank you!
Noted. And does TI has some codec chips which is supporting up to 80KHz ultrasonic signal for my application? Thanks.
Thanks for your feedback, I put another codec TLV320AIC3256 (just with minDSP inside) for this topic for comparsion in last question from me, you can refer to TIDA-01236, this is TI refernece design for ultrasonic gas leak detector.
www.ti.com/.../TIDA-01236
The codec is TLV320AIC3256 (just with minDSP inside), and use the same ultrasonic microphone SPH0641LU4H-1. And the filter C for TLV320AIC3256 is same from the reference guide page 31 is same as TLV320DAC3203, refer to below picture. I don't know why TLV320AIC3256 can work, but TLV320DAC3203 can't, I just want the ultrasonic data can go to MCU by I2S, no need DSP in codec first, we can use DSP development in MCU. Could help to check? Maybe there is some setting which can ignore the filter setting. Thanks.
Tyler,
Could you try with the PRB_R7, please? I agree with you that both TLV320AIC3256 and TLV320DAC3203 share the same decimation filters and the digital microphone connections, so it should work as well.
The 1.5.2 section of the TI Design document mentions the use of PRB_R7. This means that the decimation filter B is used instead of C. Could you try with the indications below, please? Let me know if you get better results.
Hi Luis Fernando Rodríguez S,
my engineer has tried this, but also don't have good result, we don't know what is wrong, so this is not the normal use for ultrasonic design, maybe we have to forget this solution. And I will close this topic. Thanks.