The radio unit uses a bus to communicate between the amp/radio module, the CD deck and the tape/MD deck.
The modules are put together via a connector that looks like this:
The key to match the table below to the diagram:
2 4 6 8 10 12 14 1 3 5 7 9 11 13 15 |
Pin | Function |
---|---|
1 | Bus data (+5v TTL) |
2 | Bus ground |
3/4 | Power (+12v) |
5/6 | Power ground |
7 | Eject |
8 | Not connected |
9 | Text - Cl(ock?) |
10 | Text - Do(?) |
11 | ACC (+12v) |
12 | SMUTE |
13 | Right channel audio |
14 | Audio ground |
15 | Left channel audio |
I've used my Risc PC's parallel port to watch the data exchanged between the main unit and the CD deck. A simple bit of ARM code samples roughly 1MB of data a second for about 4 seconds and writes it to disk. This data is then analysed by a small BASIC program to produce oscilloscope-like traces. Using this method, I've been able to determine some patterns to the data on the bus.
As you can see, the pulses seem to be evenly spaced, with the longer pulses indicating a binary 1 and a shorter pulse indicating a binary 0. There always seems to be an even multiple of 4 pulses, so the protocol seems to work with nybbles rather than full bytes. The bus is pulled up to 5v and the pulses are 0v. The traces are inverted to make reading them easier. Timing-wise, each 0 pulse seems to be about .5ms and each 1 pulse seems to be about 1.7ms. The pulse plus gap is about 3ms in both cases. Given this, we can transcribe the traces above as follows:
1011-1000 0001-0011 (x2) 1011-1011 1010-0000 0000-0000 0110-0000 0000-0000 1100-0001 0000-1000 1001 \ 0111-1000 0000 } (x4) 0101-1000 1110 / 0011-1001 1011 1011-1011 1010-0000 0000-0000 0110-0000 0000-0000 1100-0001 1011-1101 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0111 1011-1100 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 1000 1011-1001 0000-0000 0000-0000 0001-0000 0000-0000 0000-0000 0000-0000 1100-0000
The next action I traced was switching from the radio to the CD deck with a CD in:
0011-1001 1011 1011-1011 1001-0001 0000-0000 0000-0000 0000-0000 1100-0101 1011-1101 0001-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 1000-0000 0000-0000 1011-1100 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 1000 1011-1001 0000-0000 0000-0000 0001-0000 0000-0000 0000-0000 0000-0000 1100-0000 0011-0001 0001-0000 0001-0010 0001 1011-1001 0100-0000 0000-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-0111 1011-1100 0001-0000 0001-0001 0101-0111 0011-0100 0011-1111 0000 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-1000 (CD Track 01 00:00) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-1000 (CD Track 01 00:00) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 0001-0000 0000-0000 0001-0111 (CD Track 01 00:01) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 0010-0000 0000-0000 0001-0110 (CD Track 01 00:02) ... 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 1000-0000 0000-0000 0001-0000 (CD Track 01 00:08) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0000 1001-0000 0000-0000 0001-1111 (CD Track 01 00:09) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0001 0000-0000 0000-0000 0001-0111 (CD Track 01 00:10) 1011-1001 0100-0000 0001-0000 0001-0000 0000-0001 0001-0000 0000-0000 0001-1000 (CD Track 01 00:11)Some messages from track 2, with the fast-forward button pressed half-way through:
1011-1001 0100-0000 0010-0000 0001-0000 0000-0011 1000-0000 0000-0000 0001-0000 (CD Track 02 00:38) 1011-1001 0100-0000 0010-0000 0001-0000 0000-0011 1001-0000 0000-0000 0001-1111 (CD Track 02 00:39) 0011-0001 0001-0000 0100-0010 0110 1011-1001 0110-0000 0010-0000 0001-0000 0000-0100 0001-0000 0000-0000 0001-0100 (CD Track 02 00:41) 1011-1001 0110-0000 0010-0000 0001-0000 0000-0100 0010-0000 0000-0000 0001-0001 (CD Track 02 00:42) ... 1011-1001 0110-0000 0010-0000 0001-0000 0001-0000 0000-0000 0000-0000 0001-1000 (CD Track 02 01:00) 1011-1001 0110-0000 0010-0000 0001-0000 0001-0000 0011-0000 0000-0000 0001-0101 (CD Track 02 01:03)And some track seeking:
1011-1001 0100-0000 0010-0000 0001-0000 0001-0010 0110-0000 0000-0000 0001-0010 (CD Track 02 01:26) 1011-1001 0100-0000 0010-0000 0001-0000 0001-0010 0111-0000 0000-0000 0001-0001 (CD Track 02 01:27) 1011-1001 0100-0000 0010-0000 0001-0000 0001-0010 1000-0000 0000-0000 0001-0000 (CD Track 02 01:28) 0011-0001 0011-0000 0000-0011 0001-0100 1011-1001 0101-0000 0011-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-0101 (CD Track 03 00:00) 1011-1001 0100-0000 0011-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-0110 (CD Track 03 00:00) 0011-0001 0011-0000 0000-0100 0001-0101 1011-1001 0101-0000 0100-0000 0001-0000 0000-0000 0000-0000 0000-0000 0001-0100 (CD Track 04 00:00)From these traces, and in conjunction with watching the LCD display, I've made some headway into decoding the protocol. It was quite difficult to figure out the checksum method for the messages!
The bus message protocol seems to be a nybble based system with a minimum message length of 3 nybbles (or 12 bits). Every message is of the following format:
Purpose | Length (bits) | Notes |
---|---|---|
Module | 4 | 0000 = Tape deck 0011 = CD deck 0101 = CD changer (external) 0110 = CD changer (upper module) 0111 = MD deck 1001 = Base unit 1010 = MP3 CD deck |
Command | 4 | |
Message data | any | Message specific |
Checksum | 4 | To calculate the checksum, take all the nybbles (excluding the checksum itself, obviously) and xor them all together. Add 1 and ignore any overflow. This gives the checksum value. |
Command | Data Length (bits) | Purpose | Data Format | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0001 | 16 or 20 | Control |
|
||||||||
1000 | 0 | Anybody home? | No data | ||||||||
1001 | 0 | Wake up | No data |
Command | Data Length (bits) | Purpose | Data Format |
---|---|---|---|
1000 | 4 | 0001 - sent after connecting power | |
1001 | 52 | Status | aaaa-bbbb-bbbb-cccc-dddd-eeee-eeee-ffff-ffff-gggg-hhhh-iiii-jjjj where: aaaa is 0000 (stopped), 0110 (fast forwarding), 0100 (playing), 0101 (seeking), 0111 (rewinding) bbbb-bbbb is a BCD encoding of the current track cccc-dddd is 0000-0001 (maybe CD number in a changer?) eeee-eeee is a BCD encoding of the current position minutes ffff-ffff is a BCD encoding of the current position seconds gggg is 0100 when repeat is on, 0000 otherwise hhhh is 0010 when random is on, 0000 otherwise iiii-jjjj is 0000-[0001|1100] |
1011 | 36 | 1010-0000 0000-0000 0110-0000 0000-0000 1100 1001-0001 0000-0000 0000-0000 0000-0000 1100 1001-0001 0000-0010 0000-0000 0000-0000 1100 1001-0001 0000-0010 0000-0000 0000-0000 0001 |
|
1100 | 40 | CD info | aaaa-bbbb-bbbb-cccc-cccc-dddd-dddd-eeee-eeee-ffff where: aaaa is 0000 for no CD, 0001 for CD in drive bbbb-bbbb is a BCD encoding of the first track number cccc-cccc is a BCD encoding of the last track number dddd-dddd is a BCD encoding of the total playing minutes eeee-eeee is a BCD encoding of the total playing seconds ffff seems to be 0000 for no CD, 1111 otherwise |
1101 | 60 | 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000 (No CD?) 0001-0000 0000-0000 0000-0000 0000-0000 0000-0000 0000-0000 1000-0000 0000 (CD In?) |