Page 1 of 1

Monochrome ntsc tv "out" project

Posted: Tue Jan 30, 2007 9:48 am
by KamPutty
Hi all,

I've decided to try to display some "stuff" on a ntsc television. My first step will be simple black and white, color after I get the B/W working!

Now, I'm currently researching the problem and this is what I know.


#1. 525 Horizontal lines
#2. Does "odd" "even" interlacing, obtaining 1/60th per screen (60hz)
#3. Out of the 525 lines, only 484 is displayed, the reset are sync and other info
#4. Each line takes 60us
#5. Sync = 0v
#6. Black = .33v
#7. Grey = .67v
#8. White = 1v

What I am still missing is the actual timing for a single line

To sync/send a line this is what I do

#1. Send a SYNC level for 4us
#2. Send BLACK level for 8us
#3. I have 52us for image data
#4. Send SYNC for 4us (????)

I this correct? I know that my main main pain will be timing, but is the logic correct?

Any advice would be greatly appriciated!


~Kam (^8*

Posted: Tue Jan 30, 2007 11:25 am
by rshayes
The timing and frequency are slightly different for monochrome and color signals. There is no harm in using the color frequencies for monochrome, and it will make adding color much simpler at a later date.

The color burst frequency is approximately 3.579545 MHz. A clock frequency of 4 times this (14.31818 MHz) is convenient, since a divide by four shift counter will generate the quadrature signals necessary for generating the color subcarrier.

The horizontal rate is approximately 15,734 Hz. This is 2/455 times the color burst frequency. This can be obtained by dividing twice the color burst frequency by 455.

The vertical rate is approximately 59.94 Hz. This is 2/525 times the horizontal rate. Again, it can be obtained by dividing twice the horizontal rate by 525.

If you start with a 14.31818 MHz clock, and divide by 4, you get the color burst frequency.

Dividing the clock by 455 and then by 2, will give you the horizontal line rate.

Dividing the clock by 455 and then by 525 will give you the vertical field rate.

The horizontal sync pulses occur during a blanking interval. The blanking level is slighter blacker than black, with the horizontal sync pulses going even farther in the black direction. The time between the start of the blanking interval and the sync pulse is called the "front porch" and is nominally 2% of the line period. The sync pulse follows and is nominally 7.5% of the line period. The blanking interval continues for an additional 7% and form the "back porch". This is where the color burst occurs in a color signal. The overall line period is about 63.5 microseconds.

The vertical blanking interval is somewhat more complicated due to the addition of equalizing pulses (which can be omitted) and serration of the vertical sync pulse to allow the leading edge of the horizontal sync pulses to be transmitted during the vertical sync pulse.

I would suggest using a CPLD type of device as a timing generator. A micontroller would probably not be fast enough.

Posted: Tue Jan 30, 2007 6:09 pm
by hp
How about using a Propeller Chip from Parallax? The chip consists of 8 cogs which run 8 seperate threads, each with it's own video generator and 2 counters / plls. This enables full color video generation in either pal, ntsc, or vga. The video generation is actually done in software (the chip can also do keyboard and mouse input via software). It can even do broadcast over air video (although it is kind of iffy since the onboard plls don't output an entirely clean signal).

I have used this chip to generate a 1024x768 vga video signal for use with a network monitoring tool I was designing. The great thing is that the Propeller's simultaneous processing abilities enables you to dedicated one or two cogs to video, one to a keyboard / mouse, and the rest to working on your problem. (the chip costs $12.95 in single quantities, which is pretty much a steal when you consider the costs of video generation).


Posted: Thu Feb 01, 2007 2:31 pm
by KamPutty
Now thats what I call an explanation! My head exploded the first time, I got up, re-read it (had wrapped tape around my head to stop explosion :grin: )

That said, I was able to get Black and White working. The actual "bit banging" is simple, but man oh man, it's all about the timing!

I was able to it by doing it on the [email protected]

Code: Select all

		TV_SET_BLACK();		// front porch

		TV_SET_SYCN();		// synch	

		TV_SET_BLACK();		// back porch

		// line data - make a "Black-White-Grey" screen


Yes I know the numbers don't add up (64us), but there is alittle compiler overhead.

So this is step poc! Now, let me get my thoughts together, and I wanna talk color...

after this, the character generator!

~Kam (^8*

Posted: Fri Feb 02, 2007 8:51 am
by GoingFastTurningLeft
I believe there was an article in Nuts & Volts somewhere in the last few issues about making a PIC based character generator.

Posted: Fri Feb 02, 2007 10:58 am
by Newz2000

Do you have a picture of what you're doing? Sounds interesting, I'd love to see it.

Posted: Fri Feb 02, 2007 3:51 pm
by Tommy volts

I don't recall seeing that article, can you find which issue it is in?