26 February 2010
Author: Giorgos LazaridisHacking a Pioneer Car Cassette Player
I'm a radio fan, i do like music, and i do like listening to the radio. And because i have no TV set, a radio is a must in my house. In my old laboratory, i had an old car cassette player from - i do not really remember from where. A 12V power supply with two pioneer speakers, and the audio system was ready! But hey, now I've grown up, i have a new tech-lab, i have a neat computer desk-box, i have plenty of imagination and -most of all- i have many demands. I cannot have an ugly cassette recorder hanging there like a grape with two speakers, this is lame.
The first idea that can someone have, is to hide the radio inside somewhere, like the computer box, and have outside only some buttons, like volume, station select etc. But, here comes another problem: How can i know which station is currently playing? And here comes another idea. I will remove the LCD from the radio and i will put it near by the buttons on the control panel. LAME! No i would never do that. First of all, the control panel that i plan to make (that is another project), will have everything in blue color. The radio that i have has orange color. Despite the fact that i HATE orange color, it would also be like the black (and ugly) sheep between the neat blue digits and buttons.
Solution number 1: I will get the connections of the LCD, and according to the segments that are ON, i will reproduce the signal using a PIC. That would work, and is very straight forward for someone to understand it. Yet, i was not quite satisfied with this idea. I know that LCD segments are not powered as the LED segments. Sometimes, an alternating current is used to power them. I would face many problems and this task was rather difficult. Not knowing what else to do, i start dissembling the face-off. 3 screws and 4 clips, and it was opened easily. Carefully, i removed all the springs and shafts. Then, i reached the connection of the LCD. It had 18 pins
Perfect. Now i have 18 pins that i have no idea what each one is, a chip that i could not find ant information or datasheet, and a feeling of hunger. I was afraid that this chop-job would reach to an end quite soon. I took a break for lunch, because as the Chinese says: "Never take a decision with an empty stomach".
Google is your friend. While i was wondering here and there for some info, i found the service manual for this radio! I could hardly believe it. So, quickly, i turned to the face-off page hoping that i would find some useful info. I will not upload the manual here, but it is uploaded in this address: http://files.ddrservice.info/Audio/pioneer/pioneer-keh-3600,-2600.pdf. Finding the LCD was very easy, but for my disappointment, the only info for the 18 pins was that 4 of them are COM and the rest are segments. Great.
Hey! What is that?
In the same page of the manual, on the bottom right corner, there was something that until that moment i had not payed any attention at all. The 8-pins connector for the face-off with the cassette player had one pin named "SIO" and another named "SCK"!!! Suddenly light! Should i suppose that SIO stands for Input Output and SCK stands for Clock? Should I? There was only one way to find it out: The oscilloscope. I soldered 4 wires, one positive, one GND, the "SIO" and the "SCK", and reassembled the face-off. Then, i put it back on the player, turned it on, crossed my fingers and connected 2 channels of the oscilloscope:
Not much experience required, to understand that there is a clock signal and a data signal appearing on the screen! The clock frequency was 77KHz. while 9 bytes was keep sending from the data cable. Each byte is 8-bits long. A delay of 15 mSec is between the first and the second byte. Then, the other 8 bytes comes with an interval of 190 uSec. The next 9-byte letter comes after 38 mSec. This signal is transmitted all the time, even if the radio is off. No matter what i do with the player, no matter if i change the volume or i change stations, the signal follows the same pattern. Only the bits are changing (of course). What this means, is that i have to decode the bits. I forgot to mention that, the data appeared to be valid on the positive edge of the clock.
My oscilloscope may be digital, but the data are too much to try to read from the screen. It would take me a year to do 10-20 readings, as i have to scroll the bytes to read them. So, i made a very simple PIC circuit. A 16F631 PIC will read the data and it will display them on an LCD. The assembly code that i wrote was made in a hurry and had some bugs that i did not correct them, as i had more important things to do. If you want the assembly listing, please email me. I strongly suggest that you do it on your own though. It is not hard to write the code, when you know the pattern and what each bit stands for.
I had a feeling that the very first byte, was nothing more than a keyboard state or just a question of the player to the face-off like "are you here mate?". So, during my measurements, i just ignored it from the very beginning. Then, i start changing radio stations and writing down the 8 bytes on a piece of paper. I wrote down all 64 bits for 11 different stations. The stations that i chose were not of course my favorite stations, nor a random series. I had a logic order for the numbers. For example, first i chose stations that change only the 1st digit, then a set of stations that only the 2nd digit is changes and so on.
And here are the results. The number that will be displayed on the LCD, no matter if this is the radio station, or the volume level or the bass/treble level, comes in nibbles of the bytes 2,3 and 4. The first digit is on the 4 low bits of byte 1. The next byte carries the 2nd and 3rd digit of the number. The next byte has on the 4 high bits the last digit of the number. The 4 low bits of this byte has the number '0001' for a middle frequency (0.05) that a small '5' appears on the top right corner of the LCD. That's it!
And what can someone do with this kind of information?
With this information, the problem i had was solved! I only needed a couple of instructions more for the PIC program, and here is what i got:
The LCD shows the radio station as well! In perfect harmony! And because a video is 1000 images, where each image is 1000 words: