it is possible to use the second encoder only to change the inputs and use to encoder button to mute for atmega8515 and pga2311?
Hi,
I think we only have 1 encoder on the board ,
so i dont get what you like to change
can you explain it more
We have encoder to volume control with button but isn't used. I'd like to use this button to mute. Second encoder or rotary switch use only to change source. I need 3 pins in atmega but don't known with to use. See part control on schematic. Of course we need to modify the program.
Sorry for my english
Sorry for my english
Attachments
Last edited:
Hi,
You have to move IR-diode(RC5) to other pin like PC.7
and use INT1 (PD.3) for new encoder + PD.5 or PD.6 for encoder pin
same way as we use it for encoder on INT0
In one of my PGA2311 versions I have MUTE & ON/OFF in same button
short press MUTE long Press ON/OFF
this way you can free up 1 more pin if needed 🙂
What version of software for 8515 do you use ?
there is so many versions 🙂
You have to move IR-diode(RC5) to other pin like PC.7
and use INT1 (PD.3) for new encoder + PD.5 or PD.6 for encoder pin
same way as we use it for encoder on INT0
In one of my PGA2311 versions I have MUTE & ON/OFF in same button
short press MUTE long Press ON/OFF
this way you can free up 1 more pin if needed 🙂
What version of software for 8515 do you use ?
there is so many versions 🙂
Last edited:
Just a idea how to do it
Code:
Ddrd = &B10000000
Portd = &B01111111
Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0
Config Lcd = 16 * 2
Cursor Off
Cls
'rc5 IR OUT to PortC.7
Config Rc5 = Pinc.7 , Wait = 2000
Declare Sub Shiftlf()
Declare Sub Shiftrt()
Declare Sub Volup()
Declare Sub Voldn() '
'encoder 1 volume
Enc_a Alias Pind.1
Set Enc_a
On Int0 Int_0
Enable Int0
Config Int0 = Falling
'encoder 2 select input
Enc_b Alias Pind.5
Set Enc_b
On Int1 Int_1
Enable Int1
Config Int1 = Falling
Enable Interrupts
Do
If Pind.0 = 1 Then
'on off
Waitms 200
End If
If Pind.4 = 1 Then
'mute
Waitms 200
End If
If Pind.6 = 1 Then
'menu
Waitms 200
End If
'your other code here
Loop
End
'---------shift input Left----------
Sub Shiftlf()
'your code here
Waitms 500
End Sub
'--------shift input right----------
Sub Shiftrt()
'your code here
Waitms 500
End Sub
'-------bring volume up-------------
Sub Volup()
'your code here
Waitms 50
End Sub
'--------bring volume down----------
Sub Voldn()
'your code here
Waitms 50
End Sub
' ------------------- Int0 & Pind.1 -------------
Int_0:
Disable Int0
If Enc_a = 0 Then
Call Volup()
Else
Call Voldn()
End If
Gifr = 64
Enable Int0
Return
' ------------------- Int1 & Pind.5 ------------------
Int_1:
Disable Int1
If Enc_b = 0 Then
Call Shiftlf()
Else
Call Shiftrt()
End If
Gifr = 64
Enable Int1
Return
Edit !!!
in Int_1 sub
wrong Gifr = 64
Int1 use Gifr = 128
in Int_1 sub
wrong Gifr = 64
Int1 use Gifr = 128
Code:
' ------------------- Int1 & Pind.5 ------------------
Int_1:
Disable Int1
If Enc_b = 0 Then
Call Shiftlf()
Else
Call Shiftrt()
End If
Gifr = 128
Enable Int1
Return
Hi
Your idea with MUTE and ON/OFF in the same button is very good. I'm modify schematic can you see thet will by good? I moved IR-diode to PINC.7, RELAY-ON/OFF to PINC.6, for second encoder I use PIND.6, and PIND.5. I try to modify your program form post 370. I don't build this volume control yet but the schematic will be ok I start know.
Your idea with MUTE and ON/OFF in the same button is very good. I'm modify schematic can you see thet will by good? I moved IR-diode to PINC.7, RELAY-ON/OFF to PINC.6, for second encoder I use PIND.6, and PIND.5. I try to modify your program form post 370. I don't build this volume control yet but the schematic will be ok I start know.
Attachments
for second encoder I use PIND.6, and PIND.5.
thats wrong you must use INT1 (Portd.3) & PinD.5
thats S+ to INT1 PD.3 and S- to PD.5
I'll check more later on my way home now
Last edited:
Latest Vicol-Audio firmware version 3.5 available at
vicol audio : r-2r volume controller
Regards,
Tibi
vicol audio : r-2r volume controller
Regards,
Tibi
I'm using the TDA7439 and I would like to ask, the analog ground must be connected with the digital ground?
I'm using the TDA7439 and I would like to ask, the analog ground must be connected with the digital ground?
Yes.
Thank you danzup for the confirmation. Maybe the problem is in the program of the microcontroller.
Hi, Finally i'm build this but I have problem with backlight it's only 1sec when I turn on controler. In the file is schematic and board in pdf and eagle files. If you can tell me what is wrong? I have no idea. Maybe error is in the program?
An externally hosted image should be here but it was not working when we last tested it.
An externally hosted image should be here but it was not working when we last tested it.
Attachments
first of all we need to know what software you have used ?
did you program fusebits 8 Mhz ?
did you program fusebits 8 Mhz ?
Last edited:
I'm used this program http://www.diyaudio.com/forums/anal...trolers-source-selections-79.html#post3301063 hfuse D9, lfuse E4 and internal oscilator 8Mhz.
I'm used this program http://www.diyaudio.com/forums/anal...trolers-source-selections-79.html#post3301063 hfuse D9, lfuse E4 and internal oscilator 8Mhz.
Ahhh ,
the 2 encoder version
I found 2 erros in code there was porttb.6 but backlight is on Portd.7
new test file
If you like to chat for faster help use link My WebChat just enter a username (no password)
Last edited:
- Home
- Source & Line
- Analog Line Level
- Yet another Volume controlers and source selections