Searching \ for 'PIC to video synchronization' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/displays.htm?key=video
Search entire site for: 'PIC to video synchronization'.

Truncated match.
PICList Thread
'PIC to video synchronization'
1998\03\12@204857 by Gennady Palitsky

flavicon
face
I wonder if anybody tried to synchronize PIC to video signal. The problem is
(as far as I understand) interrupt latency. I am using 14.31818 MHz crystal
(k x horizontal sync frequency) and enable external interrupt by horizontal
sync pulse. Then I generate levels I need in a video line. I assume that due
to chosen crystal frequency interrupt latency should be equal for each line
in a field. Nevertheless vertical line on a screen have jitters of about one
cycle size (~280 nS). According to datasheet  (I am using 16C71) interrupt
latency = 3-4 cycles depending on where interrupt occurred during an
instruction cycle time. It looks like this +/- 1 cycle gives jitters
observed.
If anybody faced this problem and found the way around it, please let me
know.
Thank you in advance.

Gennady Palitsky
Jefferson Audio Video Systems
spam_OUTgennadypTakeThisOuTspammainlink.net

1998\03\12@210801 by Mike Keitz

picon face
On Fri, 13 Mar 1998 01:05:43 -0500 Gennady Palitsky
<.....gennadypKILLspamspam@spam@MAINLINK.NET> writes:
>I wonder if anybody tried to synchronize PIC to video signal.
[...]
> Nevertheless vertical line on a screen have jitters of
>about one
>cycle size (~280 nS). According to datasheet  (I am using 16C71)
>interrupt
>latency = 3-4 cycles depending on where interrupt occurred during an
>instruction cycle time. It looks like this +/- 1 cycle gives jitters
>observed.

Yes indeed it does.  The problem is that the PIC can't resolve events of
smaller than one instruction clock (xtal/4), and that your crystal (even
if it's a very good one) is never exactly the same frequency as the
incoming video.  14.318 MHz is a bad choice anyway, as it makes the PIC
instruction rate 3.579545 MHz, or 227.5 PIC instructions per NTSC line.
So the PIC will always be 1/2 cycle off of the video.

Several people have used RC or LC oscillators in circuits that stop them
before each line.  The horizontal sync pulse from the video signal is
used to restart the oscillator, always in consistent phase with the
video.

I've had good results with a continuously running LC VCO as the PIC
oscillator, and phase locked it to the video.  You should be able to find
a detailed post about that in the archive.


_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\03\12@211841 by Carey Pembroke

flavicon
face
Mike Keitz wrote:

{Quote hidden}

*NEWBIE DISCLAIMER*  I am very new to PIC programming, and more curious
than productive at this point...

What sorts of applications would video synchronization enable?  What have
you done with it?

I've studied lots of projects people have done using PICs, but have never
seen any that deal with video.  I thought the PIC was too slow for that.

Thanks!
Carey

--
  ##    An Apparition of her lover
 #  #    She recognizes with dismay;
#    #  And later on she will discover
######   That he himself had died today.
#    #
#    #                   -Edward Gorey-

1998\03\12@215200 by Gennady Palitsky

flavicon
face
---Original Message-----
From: Carey Pembroke <.....careyKILLspamspam.....TIPPETT.COM>
To: EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU <PICLISTspamspam_OUTMITVMA.MIT.EDU>
Date: Thursday, March 12, 1998 9:18 PM
Subject: Re: PIC to video synchronization
{Quote hidden}

Well, with most instructions executed in a single cycle and up to 20 MHz
crystal you can get resolution as little as 200 nS, what is good even for
character generation (though I never did that, there are enough standard
characters generator ICs on a market). But video effects like video
switching, frames, splitters etc. - your imagination is a limit.

Gennady Palitsky
Jefferson Audio Video System
@spam@gennadypKILLspamspammainlink.net

1998\03\13@120931 by Michel Tremblay
flavicon
face
On Fri, 13 Mar 1998 01:05:43 -0500 Gennady Palitsky
><KILLspamgennadypKILLspamspamMAINLINK.NET> writes:
>>I wonder if anybody tried to synchronize PIC to video signal.
>[...]
>> Nevertheless vertical line on a screen have jitters of
>>about one
>>cycle size (~280 nS). According to datasheet  (I am using 16C71)
>>interrupt
>>latency = 3-4 cycles depending on where interrupt occurred during an
>>instruction cycle time. It looks like this +/- 1 cycle gives jitters
>>observed.

>Yes indeed it does.  The problem is that the PIC can't resolve events
of
>smaller than one instruction clock (xtal/4), and that your crystal
(even
>if it's a very good one) is never exactly the same frequency as the
>incoming video.  14.318 MHz is a bad choice anyway, as it makes the PIC
>instruction rate 3.579545 MHz, or 227.5 PIC instructions per NTSC line.
>So the PIC will always be 1/2 cycle off of the video.
>
>Several people have used RC or LC oscillators in circuits that stop
them
>before each line.  The horizontal sync pulse from the video signal is
>used to restart the oscillator, always in consistent phase with the
>video.
>
>I've had good results with a continuously running LC VCO as the PIC
>oscillator, and phase locked it to the video.  You should be able to
find
> detailed post about that in the archive.

I once had to solve the same problem. I ended up creating a "software"
PLL with the pic.
I had a TTL oscilator generate the clock for the pic and then run the
clock into a NAND gate then to the pic.
Using a JK flip flop to control the gate I was able to have this circuit
"rob" a single clock cycle from the pic.
The principle was to sample the sync line just before the transition and
then send result to one pic pin connected to the
flip flop. When I sampled just before the transition, nothing happened
but if I sampled after the transition the sample level would
clock the flip-flop and make it "rob" one cycle. I was able to get 1/4
instruction cycle resolution that way and that was enough
to eliminate the apparent jitter.

This needed two extra chips though. I have since got a look on a similar
principle design that did not used any extra chip.
The PLL clock speed change was done, if I remember well, by putting a
Zener diode in parallel with one of the 15pf
crystal load capacitor. One pic pin was used to change the voltage seen
by the diode and it looked to me that the generated
change to the internal capacitance of the diode was enough to slightly
change the crystal oscillation rate. Just enough to get the PLL
action. I want to play with that idea myself !!! looked neat :-)

one of the pic pin used to

Michel Tremblay
Network specialist (CBS)
Sidus Systems Inc.
RemoveMEmtremblayTakeThisOuTspammontreal.sidus.ca

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...