monitoring audio input and send to PT8211 #3201
Replies: 3 comments 5 replies
-
The PT8211 doesn't follow I2S standards and is a Japanese format DAC, so be sure to set the LSBJ mode on the I2S device. That'll give 2x the output volume since LSBJ is shifted from I2S. Look at ADCInput for a way to get the ADC sampled periodically at the same HZ you're running your I2S. Your sketch will not accurately repetitively sample the ADC at the right rate since it's uncontrolled. |
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing me in the right direction Earle! The sketch works way better now!! It's still not perfect, but a big step in the right direction. Now I have to test it with a real audio signal :) May I ask: what is the "better" frequency to set I2S communication here? I set 44100, but what is the limit (and drawback) increasing it? Is there a better strategy to make the output wave closer to the one inputted? I will use also analog reads in the final sketch and I am concerned about how analog reads will load the overall quality... (thanks!!)
|
Beta Was this translation helpful? Give feedback.
-
Thanks guys for the help and sorry for the backward comment (and general inaccuracies: I am not a coder in real life, but try to do my best, especially when asking for help!) I will test a new version of the sketch with "while" loop and lower samples as suggested by Earle and report back as soon as I will have my hardware in front of me (likely tomorrow morning). Lurking the discussion forum a little bit more, I found a topic where a user adopted ADCInput callbacks for a task close to this. Would the use of I2S and ADCInput callbacks be a good idea here? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have written a simple sketch intended to monitor a analog signal in the audio frequency range and output to a I2S DAC (PT8211).
In this phase my goal is to see the input signal outputted as-it-is.
I am using the square wave generated by my oscilloscope as input (1KHz, 3V amplitude).
The sketch works with two (main) flaws:
1 - the out wave frequency is too low (approx 300 Hz).
2 - the DAC output level is too low (0.3V).
Could anyone help me improve the sketch by solving these two issue someway? :)
(the hardware is a Pi Pico on latest Pico core)
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions