adau1701 pushbutton volume control
Hello, DAVE,
I am using ADAU1701 MP2/MP8 GPIO as pushbutton to control volume with MCU. MP2/MP8 10k resistor pullup which is active low. these 2 GPIO nothing else use only for button. the project attached . it can play but pushbuttn did not work. i tried Hold/ Repeat time different.
1. selected the inverGPIO box, once push MP8 , then the volume go down rapidly and to mute.
2. done selected the inverGPIO box, both MP2/ MP8 no work.
3. if select the MP8 inv box in hardware configration windows, then evenif no button act , the volume goes down and to mute
How it get the volume working correctly?Volume control2.zip
Thanks!
Meican.Wu
Audio Signal Processors
SigmaDSP Audio Processors
adau1701
Hello Meican,
I think your problem is with the switches. Are the switches momentary switches or just On/Off?
This cell requires the inputs to be momentary and not held high or low. If they are held then the repeat function is engaged and the cell control counts down or up based on the repeat values.
I tested this on my eval board and all I had to do is to invert the GPIO either by using the checkbox on the GUI or by using the register settings. Either is fine to use but not both. I had to change to a different GPIO pin since my hardware uses GPIO 2 & 3 for switches.
I also made some changes to your program. I added some blocks to help with diagnosing problems and for verifying proper operation. These can be removed later but SigmaStudio is a great tool to help you "see" what is going on inside the DSP. Take advantage of it.
I added an oscillator and meter so you can see the level changing. I added a readback cell so you can see the current index setting of the volume control.
I also added some DC block filters on the inputs to remove the DC offset that the ADC converters produce.
Here is a screenshot:
I will also include the program file:
Volume control2-DT-Edits.zip
Dave T
Hi DAVE,
I use your project, and the pushbutton config as the below drawing , Strange is that when the inverTGPIO checked ,read the volume value is down automatily(by reset the readcheck box),if the inverTGPIO not checked, then the volume value is up automatily. no button push. but if the invertGPIO checked , push MP2 , can see the volume value up , but the volume then down again. cannot see MP8 act the volume value change.
Thanks!
Meican.
Hello Meican,
I think there is something wrong with your hardware. Can you use an oscilloscope and look at the switch signals coming into MP8 and MP2? See if they are what is expected. IOVDD when not pressed and ground when pressed.
It is behaving like something is stuck high or low.
Dave T
Please log in to reply.
