-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the AIC CODEC Shield as Main sound processor #67
Comments
Hello Zvika! The type of errors that you're seeing tell me that the AIC3206 is not responding to the Teensy. Typically, the problem is that the "reset" pin of the AIC3206 is not connected back to the processor (to the Teensy). So, I looked at the connection map that you provided. I think that I see the problem. Or, at least, I see one problem.
I have not fully checked your other connections, but try making the changes above and let me know! Chip |
Below is an explanation of the two changes above, for anyone that cares... Regarding the MIC_BIAS connection:
Regarding the n_RESET_1 pin:
Chip |
Hi Chip,
Thank you so much for the detailed answers!
I have made the amendments you've described
and I am happy to say that now I am *not *getting any error messages:
AudioPassThru: Starting setup()...
Setup complete.
Running...
Running...
However, no audio is heard through the headphones connected to the shield.
It was my understanding that the code is supposed to stream the input from
the microphone connected to the shield, as is, to the headphones. Is that
true? Can you advise what I can do to debug? Is there a sketch that checks
the output and input separately?
Another question that might not be relevant, upon connecting the teensy to
the computer it is recognized, per instructions on GIT, as a digital audio
device. could it be that the audio i/o is transported through the computer
instead of the earphones and microphones?
Thank you so much again,
Zvika
…On Wed, 12 Apr 2023 at 19:58, Chip Audette ***@***.***> wrote:
Below is an explanation of the two changes above, for anyone that cares...
Regarding the MIC_BIAS connection:
- This change is not critical. It is not the cause of your error
messages. But, once you get the system working, this change will help your
system's audio inputs work correctly.
- The "MIC_BIAS" connection is an *input* to the AIC Shield, not an
output from the shield. It is intended to be connected back to a GPIO pin
on your microcontroller. The microcontroller sets it HIGH or LOW. If it is
left floating ("NC"), I don't know what will happen.
- The purpose of this line is to control whether mic bias is applied
to the right input channel (IN_3_R). The AIC itself must be commanded (via
software command) to generate the mic bias voltage. By default, though, the
mic bias is only applied to the left channel (IN_2_R). To have the AIC mic
bias voltage also be applied to the right channel (IN_3_R), you must pull
the "MIC_BIAS" pin high. There is a command in the Tympan_Library to help
with this.
- If you never want mic bias, and you do not want to connect it back
to the microcontroller, you can simply tie this pin to GND
Regarding the n_RESET_1 pin:
- This change is critical. The AIC will never work without making this
change.
- The "n_RESET_1" pin is an input to the AIC Shield. It must be
connected back to the microcontroller. It is used as part of the
initialization and configuration process for the AIC (which is handled by
the Tympan_Library)
- The details of how this pin is used is too complicated to describe
here. But, basically, the pin needs to be toggled by through various HIGH
and LOW states during the initialization process. Without a connection to
the microcontroller, these HIGH and LOW transitions never happen, which
means that the AIC never initializes. As a result, the microcontroller
cannot communicate with the AIC. The failure to receive any replies from
the AIC is what causes the errors that you are seeing.
- In short: you must connect this pin back to the Teensy
Chip
—
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL63WT3WUYM7YHS7YLM5CDXA33O7ANCNFSM6AAAAAAW3QKGLQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you're not getting any errors, but you're also not getting any audio, lots could be wrong. I'd need to see a wiring diagram to help at this point:
Note that if you are using the pink jack, that's not what the Audio Pass Through example defaults to. It defaults to using the on-PCB microphones. There is an example line of code (commented out) that shows you how to switch to the pink jack (the microphone / line-in jack). Chip |
hi Chip, attaching the wiring scheme at the end of text, with a picture of the setup we have tried using both amplified and non amplified stereo lapel microphone pair, connected to the shield via pink PL jack, if the audio input isn't strong enough, how would I know about it? By adding gain, you mean by software or hardware? I tried uploading the basicGain sketch, manually setting gain up to 0.95 (getting message on the serial monitor: servicePotentiometer: Digital Gain dB = 40.0) but still no audible sound was heard on the headphones As for selecting the input source - you are right, I completely missed that. however I've tried the other two options, same result. could it be that my earphones are the cause of the problem? Is there a way to test them separately? Thanks again, Shield Teensy 4.1 First row (from left) Second row Third row Fourth row |
@zvikapika @chipaudette |
I am now running the 'OutputTone' sketch, which, if I understood correctly, is supposed to test the headphones / sound generation only, but no sound is heard (I checked the headphones with another audio source and they are OK) Maybe continuing your question, Or, could it have to do with the teensy redirecting its audio to the USB due to its definition in the Teensyduino as a USB + MIDI + Audio device? |
@zvikapika
The other connections for MCLK, BCLK, WCLK are all correct. In the list of connections above, you have pins for SCL2 and SDA2 that are incorrect. Those are for the SCL and SDA. |
YES! YES! YES! YES! YES! |
awesome! |
Hi all, Thanks for all the help! another question, coming up :) |
@zvikapika |
Unfortunately not yet, in the process. |
Yeah, that worked. I will have a chance to look at it in the next days. |
Due to Tympan Rev E being sold out, I have been trying to connect the AIC CODEC Shield directly to a Teensy 4.1 board, with no luck.
The connections I have made are according to the documentation and the Rev E PCB, as following:
Also, visual legend of the connections made can be found here:
https://www.dropbox.com/s/wg9cwudwld1ig52/AIC%20CODEC%20Shield%20Connections.png?dl=0
Upon loading the AudioPassThru sketch, I am getting no sound on the headphones connected to the shield, and serial monitor shows the following error messages:
AudioPassThru: Starting setup()...
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: INFO: Read Page. Page: 0 Reg: 27. Failed to go to read page. Could not go there.
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During writeRegister(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
AudioControlAIC3206: Received Error During goToPage(): Error = 2
Setup complete.
Running...
If there is any way we can get this to work, I'd appreciate any help at all. This project is done during a hackathon in Nigeria taking place this week, and the team is very excited to see the project work. However, so far we haven't been able to do so...
Thanks in advance for any pointer or help,
Zvika
The text was updated successfully, but these errors were encountered: