CD Changer Protocol CD Changer Protocol: Data Direction Radio To CD Changer Data Direction Radio To CD Changer
CD Changer Protocol CD Changer Protocol: Data Direction Radio To CD Changer Data Direction Radio To CD Changer
CD Changer Protocol CD Changer Protocol: Data Direction Radio To CD Changer Data Direction Radio To CD Changer
The protocol of the interface with which the radio sends commands to the CD changer, is similar to that of an IR remote control (pulse width modulation or how that
scolds)
Start bit: It consists of a 9ms high phase followed by a 4.5ms low phase.
0 bit: A bit with the value 0 is represented by an equal high and low phase. The length is 0.55ms each. So the bit has a total length of 1.1ms.
1-bit: A 1-valued bit represents a 0.55ms high pulse followed by a 1.7ms low phase. The total length is 2.25ms.
A command consists of 4 bytes, whereby in my interpretation the LSB (least significant bit) of each byte is sent first.
The picture above shows the bit sequence "01010011 00101100 01111000 10000111". This corresponds to the hexadecimal representation "CA 34 1e e1". The radio
has informed in this case that the next title should be played.
radiotxbuf[0] = CDCState.mode;
radiotxbuf[1] = CDCState.cd | 0x40;
radiotxbuf[2] = ((CDCState.tr / 10) * 0x10) + (CDCState.tr % 10);
radiotxbuf[3] = ((CDCState.min / 10) * 0x10) + (CDCState.min % 10);
radiotxbuf[4] = ((CDCState.sec / 10) * 0x10) + (CDCState.sec % 10);
radiotxbuf[5] = CDCState.state;
radiotxbuf[6] = CDCState.stat2;
radiotxbuf[7] = CDCState.mode & 0xf7;
First of all this is the pinout of the radio: rkieslinger.de/steckerbelegungen/vag-stecker.htm The interesting cell is no. 3, the blue one. DATA IN simply is MOSI of an
8bit SPI interface with special timings between the bytes CLOCK is SCK of the SPI DATA OUT is the key code of the pressed key on the radio itself
The radio needs a sequence of bytes to enable the AUX input and display CD# and TR#. It looks likes this:
frame cd# tr# time time mode frame frame
0x34, 0xBE, 0xFF, 0xFF, 0xFF, 0xFF, 0xCF, 0x3C
cd# and tr# are sent inverted. So this sequence will display: CD1 TR00 mode sets the playmode (PLAY|SHFFL|SCAN) As the beta doesn’t support time display, I will
ignore these bytes.
Links:
* https://martinsuniverse.de/projekte/cdc_protokoll/cdc_protokoll.html * https://www.mictronics.de/projects/cdc-protocols * http://kovo-
blog.blogspot.com/2014/02/cd-changer-emulator.html * http://schuett.io/2013/09/avr-raspberry-pi-vw-beta-vag-cdc-faker/