Monochrome ntsc tv "out" project

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
KamPutty
Posts: 67
Joined: Sun Feb 19, 2006 1:01 am
Contact:

Monochrome ntsc tv "out" project

Post 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.

NTCS

#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!

Thanks!

~Kam (^8*
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Post 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.
hp
Posts: 245
Joined: Sat Aug 09, 2003 1:01 am
Location: Friendswood, TX
Contact:

Post 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.

http://parallax.com/propeller/ (the chip costs $12.95 in single quantities, which is pretty much a steal when you consider the costs of video generation).

Harrison
KamPutty
Posts: 67
Joined: Sun Feb 19, 2006 1:01 am
Contact:

Post 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 PIC18f@20mhz

Code: Select all

		TV_SET_BLACK();		// front porch
		delay_us(3);        

		TV_SET_SYCN();		// synch	
		delay_us(4);

		TV_SET_BLACK();		// back porch
		delay_us(3);

		// line data - make a "Black-White-Grey" screen
		TV_SET_BLACK();
		delay_us(17);

		TV_SET_WHITE();
		delay_us(17);

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

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

after this, the character generator!

~Kam (^8*
User avatar
GoingFastTurningLeft
Posts: 163
Joined: Wed Sep 06, 2006 7:33 pm
Contact:

Post by GoingFastTurningLeft »

I believe there was an article in Nuts & Volts somewhere in the last few issues about making a PIC based character generator.
Newz2000
Posts: 507
Joined: Wed May 18, 2005 1:01 am
Location: Des Moines, Iowa, USA
Contact:

Post by Newz2000 »

KamPutty,

Do you have a picture of what you're doing? Sounds interesting, I'd love to see it.
Tommy volts
Posts: 149
Joined: Tue Oct 29, 2002 1:01 am
Location: Arizona
Contact:

Post by Tommy volts »

GoingFastTurningLeft:

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

Who is online

Users browsing this forum: Ahrefs [Bot] and 27 guests