AVR PAL colour bar generator

I start this project 3 weeks ago, because I was wonder " is that possible, some AVR MCU to create simple colour bars? " At the beginning I believed that its easy. So, I ask some people who they knew more about PAL composite video signal. Some of them told me that is impossible to product color entire-in-software with AVR MCU (microcontroller) because there is not enough power (frequency).

The first idea they was to work with 8.867238 MHz crystal (2 times the color carrier). When I read more about PAL video composite signal creation, I saw that, if you want to product colors entire-in-software you must to create the color-carrier (4.43 MHz), to change 4 times the phase of color-carrier (one time for each color), to show 4 colours. Except that, you have to change the color-burst from 135 deg to 135+90= 225 deg.

So, the 8.86 MHz its not enough, that`s why I used 17.7 MHz crystal (4 times the color carrier). The only easy is to create the white and the black bar, the rest of this project, beleave me, its not easy.

The timing (clock cycles) of any instruction is very important for the phase-shift of the color-carrier and color-burst signals. Calculate the cycles before add or remove any instruction.

[b:e78ff17806]The circuit[/b:e78ff17806]
[img:e78ff17806]http://www.circuitdb.com/download.php?fileID=69[/img:e78ff17806]

The circuit (see Color bar Schematic.jpg)it is constituted by AT90s2313 running at 17.734475 MHz (overclocked) and one, 5 bits DA converter (R2R-ladder) with 10 resistors.

I know, its not good to overclocking 77 % up from the working frequency of the MCU, but for a few hours, nothing wrong it will happen.

Programm the MCU with colour_bar_gen.hex that its included in colour_bar_gen.zip file, connect it on composite video connector (or scart adapter) of your TV, power-on the circuit and you will see on TV, 6 vertical bars, 4 in color, 1 white and 1 black.

I don’t make any explanation about "how does the PAL video signal its working" because nor and i I understood exactly how does its work. Thats why my circuit have some problems with color-hue. May be some one of you, have the knowledge and the time, to continue this project..

Copyright 2003 Serasidis Vasilis ([url]http://www.serasidis.gr/[/url])

The schematic, source code and hex file v1.0. All in [url=http://www.circuitdb.com/download.php?fileID=70]colour_bar_gen.zip [/url]

If you improve the source code of this project, please inform Serasidis Vasilis.

Zdenek Zechovsky improved the original source code. He added some new features.
See [url]http://www.serasidis.gr/circuits/colour_bar_gen/colour_bar_gen.htm[/url] for details on this improvement.Parts:1 x AT90s2313
1 x 17.734475Mhz crystal
2 x 22 pF condensator
6 x 1 kOhm resistor
4 x 500 Ohm resistor

Leave a Reply

Your email address will not be published. Required fields are marked *