Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AT90S2313 based TV Pattern Generator

Status
Not open for further replies.

mox77

Newbie level 1
Joined
May 13, 2010
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,289
TV Pattern Generator

hey every body

For my assignment project i have program a AT90S2313 microcontroller to display "chequer-board" array of squares alternating between black and white on a tv screen. this pattern will have 17 vertical columns and 12 horizontal rows.

Can anyone help me on how to get started with this please!!

It will be greatly appreciated thanks.
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
15,169
Helped
4,948
Reputation
9,917
Reaction score
4,764
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
128,853
Re: TV Pattern Generator

I can't help you with the program but I can explain the principle:

TV pictures are made of horizontal lines, starting at the left side, finishing on the right side and moving down slightly from top to bottom of the picture before starting at the top again. Each point along the line has a brightness associated with it, the changes in brightness as the picture is scanned, taking into account our persistence of vision, makes up the image we see.

Hidden from view is some more information, called sync pulses. These are not visible, in fact they are off the edges of the screen but they are necessary to ensure the horizontal and vertical scans start at exactly the right time.

What your software has to do is simulate these sync signals and a voltage to represent the brightness of the squares in your "chequer-board". The squares are easy, white can be a logic high and black a logic zero so all you have to do is make sure the signal changes at the right time. The syncs are also easy and because the TV locks to them, you don't have to make them too precise. The actual timing depends on which TV system you are using, it is slightly different between PAL/SECAM and NTSC systems. There is a very good explanation here:
https://www.batsocks.co.uk/readme/video_timing.htm

So your software has to do something like this:
1. create long vertical sync pulses
2. create horizontal sync pulse,
3. create square wave so you get alternating white then black pixels
4. go back to step 2 for as many times as you need to set the square height
5. create horizontal sync pulse
6. create square wave so you get alternating black then white pixels
7. go back to step 5 for as many times as you did in step 4 (so the height is the same)
8. go back to step 1.

I have ignored 'interlacing' in the example above as it isn't strictly necessary for your task. If you want to introduce it to give a sharper picture, you have to alter the vertical sync width each time you pass step 1 so that alternate scans are half of one line displaced.

For the analog side of things, threat syncs as zero volts, black as 0.3V and white as 1V. Again there are slight differences in these between TV systems but using those voltages will work just about everywhere. If you make the sync come out of one port pin and the video out of another, you can set these voltages with a simple resistor network.

I did something similar at this web page:
https://www.atv-projects.com/50p_SPG.html

Note that this produces syncs but not a 'chequer-board', however it does use intelacing, hence the different field (vertical scan) waveforms.

Brian.

Added after 31 minutes:

Looking at the link IanP sent - I would be very tempted to correct the odd phase shift with an LC network in the video 'DAC' to bring it back to normal RGB bars !
Brian.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
48,956
Helped
14,344
Reputation
28,952
Reaction score
13,086
Trophy points
1,393
Location
Bochum, Germany
Activity points
282,435
Re: TV Pattern Generator

Generating the colour carrier and burst with a standard 8-bit uP is actually advanced stuff. But basic BAS with the said
simple pattern should perfectly work following your precise suggestion, and allow straightforward coding.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top