Thank you <<very much>> for the basic information and the schematic
After successfully building a prototype, I want to suggest some improvements:
- in case the ring is to be grounded and diodes are involved (different circuitry is recommended when using a uC, avoiding diodes), it is highly recommended to use schotty-diodes because of lower forward voltage
- anyhow the resistor values need to be optimized (otherwise I did not obtain reliable operation) for actual headunits operating on 3.3V instead of 5V: I recommend using 10k instead of 11k, and 6.8k instead of 8.2k, together with schottky-diode for the "next/previous album" function
- it seems the internal programming of the AD-converter operates on 7.5% steps of the reference voltage (3.3V/5V), starting with 17.5% for "On/Off/Source" ranging up to 85% for "band/escape". Assumed this is right, the resistor values given by JVDE can be optimized a little (see table below). Without grounding the ring, two more codes seem to be possible (at 25% with a resistor of 2.4k and at 77.5% with a resistor of 33k).
The resistor values based on the 7.5% assumption and selected from E24 series, they rely on the schematic of the headunit providing a 10k pull up at the AD-input and a 1k series resistor to the input clamp:
1.1k (17.5%) "On/Off/Source"
2.4k (25.0%) ???
3.9k (32.5%) "ATT"
5.6k (40.0%) "Info display select"
8.2k (47.5%) "next Track" or 6.8k + schottky + ring grounded "next album"
11k (55.0%) "prev. Track" or 10k + schottky + ring grounded "prev. album"
16k (62.5%) "volume up"
22k (70.0%) "volume down"
33k (77.5%) ???
56k (85.0%) "band/escape"