Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to generate PAL video signals by using 16f877

Status
Not open for further replies.

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,574
Helped
4,778
Reputation
9,573
Reaction score
4,558
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,235
You can't generate a color PAL signal in a 16F877, it isn't fast enough to generate the amplitude and phase changes needed at 4.433MHz rate.

It IS possible to generate simple graphics like color bars or a test card if you clock it at 4*Fsc and divide the clock by 4 to generate the color subcarrier but tis needs additional digital and analog circuitry.

Other places to look:
http://www.batsocks.co.uk/readme/video_timing.htm
http://www.atv-projects.com/50p_SPG.html
http://www.atv-projects.com/Testcard_Generator.html

The last link can be interfaced to a processor to give more screens or simple animation.

Brian.
 

nctgayaranga

Newbie level 4
Joined
Apr 4, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
First of all thank you

But i saw in this link it can do by using two 16f877 MCU http://www.phoenixbit.com/ in Pic-n-Pic TC Graphics/Game System

can you briefly explain about "it isn't fast enough to generate the amplitude and phase changes needed at 4.433MHz rate"?

I want to do it by using 2 resistors with voltage devision
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,574
Helped
4,778
Reputation
9,573
Reaction score
4,558
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,235
That project doesn't use PAL, it just fiollows the timings of the PAL TV system. PAL (Phase Alternation Line) is a method of encoding color information in a way that makes it relatively immune to phase distortion. The link doesn;'t use color at all, it produces a monochrome picture.

To generate true PAL color you need to generate a signal from two AM modulators working from an I & Q subcarrier at 4.433619MHz and reverse the phase on alternate lines, there is nothing in the schematic to do this and the PICs are far too slow to do it in software.

Brian.
 

nctgayaranga

Newbie level 4
Joined
Apr 4, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
No Dear
I want to do it as a pic base project

can you define other way for me go head(other pic )
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,574
Helped
4,778
Reputation
9,573
Reaction score
4,558
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,235
It depends very much on what you want to display, you might be able to produce a PAL modulator using something like a dsPIC but it would be restricted in what else it could do at the same time. This is why dedicated PAL modulator ICs exist and why most PAL encoders use analog components. The timing of PAL signals has to be very precise and to produce different colors it is necessary to alter their amplitude and phase while keeping the frequency stable. It is possible to mathematically produce the correct waveforms but it's quite complicated and needs 'full time' processing so it can't be disrupted by other tasks. Consider for example that to generate one cycle at 4.433619MHz, a PIC like the 16F877 would have to be clocked at 35.47 MHz and that's just to output a subcarrier frequency without any syncs, color or other information.

Brian.
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,574
Helped
4,778
Reputation
9,573
Reaction score
4,558
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,235
He hasn't overcome the problem, it isn't PAL encoded.
If you read the artcle it suggests a faster Scenix processor might be able to do the job.

Brian.
 

nctgayaranga

Newbie level 4
Joined
Apr 4, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
In my project I try to write like this

Line 1: [Long vertical sync] [Long vertical sync]
Line 2: [Long vertical sync] [Long vertical sync]
Line 3: [Long vertical sync] [Short vertical sync]
Line 4: [Short vertical sync] [Short vertical sync]
Line 5: [Short vertical sync] [Short vertical sync]
Line 6: [Picture]
Line 309: [Picture]
Line 310: [Short vertical sync] [Short vertical sync]
Line 311: [Short vertical sync] [Short vertical sync]
Line 312: [Short vertical sync] [Short vertical sync]


This is a field of tv picture
so where to add that higher resolution by shifting out data in http://www.rickard.gunee.com/projects/video/pic/howto.php

what will i do to get that resolution
 

betwixt

Super Moderator
Staff member
Joined
Jul 4, 2009
Messages
14,574
Helped
4,778
Reputation
9,573
Reaction score
4,558
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
124,235
You haven't got the syncs quite right. there are two fields, the 'odd; field and the 'even' field. Lines 1 to 312.5 are slightly different to lines 313.5 to 625. The half line is there to delay the second field so the lines interlace with each other. In true PAL, there are four fields because as well as the syncs, the color burst advances 90 degrees phase on each field but you probably don't want to worry too much about that.

Also don't forget that each picture line also has a blanking period consisting of a front and back porch, 11 cycles of color burst alternating in phase on each line and a sync pulse.

The higher resolution picture part is toggling one of the port pins, high = bright, low = dark. Normal PAL pictures have a video resolution reaching about 5MHz per pixel but as you only have a 20MHz clock and you need two instructions to raise and lower the pin signal and each instruction takes four clock cycles, the best you can achieve with a 20MHz clock is 2.5MHz.

I have not tried it myself but I hear that some people have managed to generate video using the UART in synchronous mode. When synchronous mode is selected, you have to provide an external UART clock which becomes the 'dot clock' to produce one pixel. Unlike async mode it doesn't add start and stop bits so you can use it as a video shift register and take the video from the TX pin.

Brian.
 
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top