magician13134 wrote:Alright. And one more thing. If I wanted to use a rocker switch like that for volume control... How would I (could I?) do that? Would I need a digital potentiometer? What would be the best solution there?
A digital pot is very simple, since all you need are two input switches (either two individual ones, or a rocker with two poles like my bike turn signal switch for left, off, right, just not latching like that).
A digital pot with two separate buttons often even gives you the option for instant mute, by pressing both buttons at the same time (many devices I've used do this, such as TVs, stereos, etc).
Maxim makes a number of them:http://para.maxim-ic.com/en/search.mvp? ... ree=master
Some have rotary encoder interfaces, some have button interfaces.
Some even have built-in audio post-processing, such bass/treble and "ambience", etc.
Some are addressable by the microcontroller via 2-Wire protocol, for example, to get to advanced functions and whatnot.
Some have LED drivers built-in as well.
Some even have a separate subwoofer out, though you won't need that for the MP3 player.
They do all the debouncing for you, so you don't have to deal with it in hardware or software. They also remember the last setting, so you don't have to reset the control every time you power cycle the unit.
This one, as a simple 4-button example, also has features like "auto accelerate", meaning it goes up (or down) faster the longer you hold the button down, so you don't have to keep clicking the thing to go far in it's range. http://www.maxim-ic.com/quick_view2.cfm/qv_pk/5288
It has a 5-led level meter output if you want to use it, which will also indicate left/right balance while you're adjusting that, if you need it.
The pots are dual, controlled as stereo.
It only uses 1uA in "shutdown" mode.