Author Topic: A few issues with generating composite PAL using logic IC's  (Read 8891 times)

0 Members and 3 Guests are viewing this topic.

Offline PauloConstantinoTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 154
  • Country: gb
A few issues with generating composite PAL using logic IC's
« on: January 15, 2017, 10:16:35 pm »
Hi friends,

I have finished working on a simple video card that generates sync pulses for PAL/CCIR monochrome televisions. Apparently I have gotten the TV to sync to my signals, however, I was hoping to be able to control the brightness of the screen with my circuit in order to confirm that the TV was really obeying the circuit. Here's the problem! The TV only shows a white screen. I don't know how to manipulate the voltage in order to lower it and match the TV's requirements.

My signals stay constant at around 4.5V, and then at sync times they go to 0V. What should I do to them to be able to fit them to the TV's requirements for composite PAL?

Some sources say the sync pulses are -0.3V rather than 0V. Some say it's 0V. I tried inverting the signals to see what happens and what I see on the TV are lots of little horizontal white lines in a black screen, and a thick white line at the bottom. Since this is the inverted signal, does this mean that the original signal is correct? Since if the inverted one was correct, it wouldnt show the white lines everywhere.

I appreciate your help.

Paul
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #1 on: January 15, 2017, 10:44:10 pm »
What the absolute voltage level is, is a question of definition. Composite video signals are normally AC coupled, meaning picture content shifts the DC level.

The reference point for composite PAL video  is always the black level.

Standard composite video has an amplitude of 1 V peak-to-peak (or white-to-sync if you like).

Setting the black level as zero (your reference point), the voltages are:

Peak white: 700 mV
Black: 0 V
Sync pulse: -300 mV

All video decoders sample and clamp the black level (due to the AC coupling), and process sync and luma/chroma from there.

If you want to adjust brightness, you'll need to keep the black level constant, preserve the sync amplitude, and only attenuate the 0...700 mV part of the signal where active video is present. This is not trivial and involves timing constraints as well.

« Last Edit: January 15, 2017, 10:54:50 pm by Benta »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 14132
Re: A few issues with generating composite PAL using logic IC's
« Reply #2 on: January 15, 2017, 10:46:38 pm »
You are after a 1V peak signal into 75 Ohms.  Start with a 2V signal and put a 75R resistor in series with the video buffer's output.   The analog video signal goes between 30% (black), and 100% (white) and the sync pulses go down to 0%.  Your Video generator circuit must output the 30% black level during the front and back porch intervals before and after the sync pulse, as many monitors and other device with video input, AC couple the video signal and sample one or other of the porches to restore the DC level.  Other cheaper devices clamp on the bottom of the sync pulse so its critical that it uses the full 30% of the voltage range.

How to get there from what you have is difficult.  If you explain your circuit in more detail including what output device(s) you are using, and the available supply rails, we'll try to help.
 

Offline Brumby

  • Supporter
  • ****
  • Posts: 12612
  • Country: au
Re: A few issues with generating composite PAL using logic IC's
« Reply #3 on: January 15, 2017, 11:01:27 pm »
It seems you don't have a proper understanding of the "shape" of a composite video signal.

Here's an image I found that should be helpful:
(Use this in conjunction with the previous 2 posts)
« Last Edit: January 15, 2017, 11:07:34 pm by Brumby »
Why Clippy?  --> https://www.youtube.com/watch?v=2_Dtmpe9qaQ
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #4 on: January 15, 2017, 11:08:46 pm »
Have you even read the Wikipedia article on this subject?  Why did you think 4.5v is a suitable level?

Black = 0.3v, White = 1v, sync = 0v

Cool project and good work, but seriously mate, do some basic research.

PS. There is no such thing as "Monochrome PAL.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #5 on: January 15, 2017, 11:08:55 pm »
OK, rereading your first post, this jumped out at me:

Quote
My signals stay constant at around 4.5V, and then at sync times they go to 0V. What should I do to them to be able to fit them to the TV's requirements for composite PAL?

So your black level is 4.5 V and your sync level is 0 V. Let's get this adjusted first:

Reduce this amplitude to 300 mV with an output impedance of 75 ohms. This is easily done with a voltage divider that divides by 15 and where the two resistors calculated in parallel exhibit a resistance of 75 ohms.

A quick 'n dirty calculation says 1.2 kohm and 82 ohm.

Now you can supply your monitor with a black signal and sync pulses with the correct amplitude.
Injecting active video is the next exercise  :D

« Last Edit: January 15, 2017, 11:12:01 pm by Benta »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #6 on: January 15, 2017, 11:25:07 pm »
Quote
Here's an image I found that should be helpful:

Not really, it rather muddies the waters. It's a picture of NTSC/EIA, but the OP is asking about PAL/CCIR. When googling for pictures like this, it's to everyone's advantage if you have some knowledge beforehand.

PAL/CCIR has no front/back porch, or rather: they are at black level.
PAL/CCIR relative peak levels are +100 to -43 IRE, not -40 IRE.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #7 on: January 15, 2017, 11:30:02 pm »
Quote
Have you even read the Wikipedia article on this subject?

Which Wikipedia article(s)?
The ones I've seen are complete cr*p and I fully understand the OP's problems here.

 

Offline PauloConstantinoTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 154
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #8 on: January 15, 2017, 11:34:37 pm »
OK, rereading your first post, this jumped out at me:

Quote
My signals stay constant at around 4.5V, and then at sync times they go to 0V. What should I do to them to be able to fit them to the TV's requirements for composite PAL?

So your black level is 4.5 V and your sync level is 0 V. Let's get this adjusted first:

Reduce this amplitude to 300 mV with an output impedance of 75 ohms. This is easily done with a voltage divider that divides by 15 and where the two resistors calculated in parallel exhibit a resistance of 75 ohms.

A quick 'n dirty calculation says 1.2 kohm and 82 ohm.

Now you can supply your monitor with a black signal and sync pulses with the correct amplitude.
Injecting active video is the next exercise  :D


Benta, I'm gonna try this right now! What I did with my circuit was to just add the sync pulse patterns and then keep the rest at a constant voltage, thinking that later on I'd be able to control this constant voltage to add video pixels. I am taking the output directly from a 74HC86 IC, which provides 4mA current at 4.5V output. My difficulty is to make this 4.5V signal into a lower voltage that can be seen as black by the TV. I want to do this just so I can adjust the brightness and see that the TV is really synchronized. Then later on I'll make a proper pixel circuit.

I will try your voltage divider idea right now and get back to you.

Thank you a lot! :)
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #9 on: January 15, 2017, 11:37:04 pm »
Quote
Have you even read the Wikipedia article on this subject?

Which Wikipedia article(s)?
The ones I've seen are complete cr*p and I fully understand the OP's problems here.

Fair point.  This one does at least show the voltage levels though.  https://en.m.wikipedia.org/wiki/Composite_video

 

Offline PauloConstantinoTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 154
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #10 on: January 15, 2017, 11:38:34 pm »
Have you even read the Wikipedia article on this subject?  Why did you think 4.5v is a suitable level?

Black = 0.3v, White = 1v, sync = 0v

Cool project and good work, but seriously mate, do some basic research.

PS. There is no such thing as "Monochrome PAL.


How do you think I was able to make a circuit that generates the correct patterns if I hadn't done research? I have read plenty, that's why I was able to make the circuit which generates the signals. Now I just need to convert the 4.5 volts to the correct amplitude and at the right impedance, which is what I need help with.
 

Offline PauloConstantinoTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 154
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #11 on: January 15, 2017, 11:40:50 pm »
Quote
Have you even read the Wikipedia article on this subject?

Which Wikipedia article(s)?
The ones I've seen are complete cr*p and I fully understand the OP's problems here.


You are the nicest person I've ever met in a forum! I really appreciate that. I'll get back to you after I try the voltage divider :)
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #12 on: January 15, 2017, 11:47:49 pm »
Quote
This one does at least show the voltage levels though.  https://en.m.wikipedia.org/wiki/Composite_video

Took a look at that one... it's one of the worst Wikipedia articles I've seen on this subject.
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #13 on: January 15, 2017, 11:54:08 pm »
This is a good read for generating composite video from logic circuits (an MCU in this case, but all good info)

http://www.rickard.gunee.com/projects/video/pic/howto.php
« Last Edit: January 16, 2017, 12:17:05 am by Delta »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #14 on: January 15, 2017, 11:55:51 pm »
Error in SQL Query:

 :palm:

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #15 on: January 16, 2017, 12:07:46 am »
Paolo, sorry. My quick 'n dirty calculation was too quick:
you should aim for 600 mV pp at the voltage divider output (I forgot to include the 75 ohms at the input of your TV).
Use 560 ohms and 82 ohms instead.

Good luck.

« Last Edit: January 16, 2017, 12:21:47 am by Benta »
 

Offline PauloConstantinoTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 154
  • Country: gb
Re: A few issues with generating composite PAL using logic IC's
« Reply #16 on: January 16, 2017, 12:35:06 am »
Paolo, sorry. My quick 'n dirty calculation was too quick:
you should aim for 600 mV pp at the voltage divider output (I forgot to include the 75 ohms at the input of your TV).
Use 560 ohms and 82 ohms instead.

Good luck.

I've read most articles on video generation that Ive found on the web. I tried the voltage divider but it didn't work :(

The strange thing was that the voltage divider added a lot of noise to the signal. Really a lot!

I really have no idea what to do now. My signals timings are all correct, and the TV is working fine............Unfortunately I have no schematics because I just built it from my mind to test it real quick. I can see on the scope that the signals are correct.

This is really odd :(
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #17 on: January 16, 2017, 09:24:23 am »
Strange, loading a 74HC86 should not result in noise.
Is the supply line decoupled correctly ?
 

Offline deephaven

  • Frequent Contributor
  • **
  • Posts: 796
  • Country: gb
  • Civilization is just one big bootstrap
    • Deephaven Ltd
Re: A few issues with generating composite PAL using logic IC's
« Reply #18 on: January 16, 2017, 09:38:50 am »
What sort of input is the TV? Is it a composite input on an Phono connector or SCART connector?

Do you have a means to generate  a separate signal to the syncs which corresponds to the active part of the TV line? You need to mix this with your syncs so that (as described earlier) you get three levels - sync tip, black level, white level.
 

Offline knks

  • Regular Contributor
  • *
  • Posts: 51
  • Country: au
Re: A few issues with generating composite PAL using logic IC's
« Reply #19 on: January 22, 2017, 10:25:48 pm »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 7181
  • Country: de
Re: A few issues with generating composite PAL using logic IC's
« Reply #20 on: January 22, 2017, 10:50:06 pm »
Quote
Video Signal Measurement and Generation Fundamentals

http://web.archive.org/web/20071220234050/http://zone.ni.com/devzone/cda/tut/p/id/4750

Very nice page, and miles better that what's found on Wikipedia. Thank You.

Still has problems, though, but 95% of it is OK.

 

Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: A few issues with generating composite PAL using logic IC's
« Reply #21 on: January 22, 2017, 11:16:28 pm »
Note in particular Fig.6 "Video Levels"  in the National Instruments web page.
http://www.ni.com/white-paper/4750/en/#toc5

Because the video signal is effectively AC coupled, the receiver/display samples the signal voltage level at a critical time slice of the video signal.  That period after the color burst and before the start of the image area is the blanking and "Black Reference" level.  The display samples (and holds) that voltage as the starting point of measuring the brightness for the entire line.  And then it gets reset, sampled held and referenced again for each line.

Because of backwards-compatibility with antique 70 year old CRT technology, here in NTSC-land, our black level is 7.5 IRE  But you guys in the PAL/SECAM territories have blanking = black = 0 IRE.  So that greatly simplifies DIY video signal construction.

The peak to peak video level has been 1V for perhaps 50 years, since it was standardized back at the begining of color technology. Long, long ago, perhaps long before you were born, composite video signals were up at 4.5V PP.  Creating the proper waveform should be an issue of relative voltages. You can use a simple attenuator to knock the PP voltage down to 1V at the output of your video circuit.  I wouldn't worry about absolute levels until the final output attenuator.  But any signal over 1V PP will almost certainly be mis-read as all-white by any video display.
« Last Edit: January 22, 2017, 11:21:10 pm by Richard Crowley »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8797
  • Country: ca
    • LinkedIn
Re: A few issues with generating composite PAL using logic IC's
« Reply #22 on: January 22, 2017, 11:29:05 pm »
Ohhh, the good old days.  I remember programming and overclocking a PIC16C54 + an analog CMOS 4053 switch as a dac to generate a full composite sync & it also had the ability to sync lock in and superimpose an incoming video signal.  Also had a 16 letter font with OSD capabilities.  When I switched to an altera EPM7128 combined with the pic, I had better text with color + color burst generation and locking.


Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8797
  • Country: ca
    • LinkedIn
Re: A few issues with generating composite PAL using logic IC's
« Reply #23 on: January 22, 2017, 11:41:21 pm »
But any signal over 1V PP will almost certainly be mis-read as all-white by any video display.

Today's norm, in consumer AV equipment, is with no load on your video out, there usually is a 2v p-p signal.  When the TV applies a 75 ohm load, then you should have a 1v p-p on your video signal.  This means you should have a series 75 ohm resistor on your output & before that 75 ohm, you should have a good 2vp-p drive.  The signal should be AC coupled, but, most TV are forgiving/allow a 0v-1v signal when they load your signal with their internal 75 ohm terminator.  I used to use a 470uf series cap in my circuits to remove this DC.


Offline Richard Crowley

  • Super Contributor
  • ***
  • Posts: 4319
  • Country: us
  • KJ7YLK
Re: A few issues with generating composite PAL using logic IC's
« Reply #24 on: January 23, 2017, 12:02:17 am »
Yes, @BrianHG is absolutely correct.  I neglected to mention the 75 ohm source impedance requirement which matches the 75 ohm destination impedance.  So the output from your video circuit would be 2V PP behind 75 ohms.  So that when it is terminated at the destination with 75 ohms, it becomes 1V PP.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->