Atmel AVR Atmega168 RDS decoder with serial output


I have build a RDS (Radio Data System) decoder with a microcontroller from Atmel. This decoder is fed by a RDS demodulator IC (or tuner) which has RDDA (data signal) and RDCL (clock signal) outputs.

The microcontrolller is an Atmega168 clocked on the external 4.332MHz crystal from the RDS demodulator. In my prototype I have used the (I think obsolete) TDA7330B RDS demodulator IC from STMicroelectronics. The TDA7330B is connected to the Atmega168 with RDDA connected to PD4 (on PORTD) and RDCL to INT0 (PD2).

The tuner I have used is an old Hauppauge WinTV PCI card with FM tuner which I can tune to the Frequency I want with some software. The tuner module on this card is an FM1216 from Philips. It has an unmodulated MPX FM signal output (AF sound output) which the RDS demodulator needs. This is the same signal which is fed into a stereo decoder to produce stereo sound outputs.

The yellow wire on the right is the MPX output:


This is the TDA7330B RDS demodulator, you can see the MPX wire coming from the WinTV tuner. This board also provides the clock signal for the microcontroller (wire on the crystal) and RDDA and RDCL outputs.


This is the Atmega168 microcontroller which tries to decode the RDDA and RDCL RDS outputs from the demodulator. When the Atmega168 successfully decodes something it will send the output on its USART port to the PC wich is running a terminal program. The serial output first goes to the MAX233 to convert the signal to RS232 levels. The speed is 38K4 8N1.


Hauppauge WinTV radio software is used to tune to the correct station:


The serial output from the microcontroller looks like this:


The software in the Atmega168 is able to decode the following RDS data:

The software can also output all RDS groups in undecoded form by sending character 'G' to the Atmega:


Downloads

20060629-1 HEX file for the Atmage168. Note: low fuse: 0xF0, high fuse: 0xDD.

Released source code for the 20060629-1 version under GPL2 license. Have fun, let me know what you made with it! Send me some pictures and details of your project.
20060629-1 source for the Atmage168


It is funny to note that when I am developing the software in the Atmega all sorts of radio stations have very crappy RDS encoders installed.
For example:




Want to drop me a line? email me. I always read your email, and if you are the lucky one, I will send a reply.

Kind regards, DiNo