PDA

View Full Version : Synchronizing Xtal Osc



Ron Marcus
- 21st October 2004, 22:44
I am doing some video OSD work, and need to synchronize the crystal oscillator on a 16F628 to the horizontal sync signal.
My question is, can I stop the oscillator by switching the xtal pin to ground, then turn it back on (reliably) with a horizontal sync pulse? I have seen this done with an RC oscillator, but I don't know if the crystal will start up reliably each time when it is "released"? Has anyone tried something similar?

mister_e
- 22nd October 2004, 02:52
My question is, can I stop the oscillator by switching the xtal pin to ground, then turn it back on

at my opinion, answer is no. it will cause pic to reboot or malfunction or maybe freeze to some adress.

If want to add text to a video signal, why not using some BOB-3 Video-Text Overaly Module

http://www.hvwtech.com/downloads/manuals/Bob3_Applications_Guide.PDF

or may want you to design your own... have a look over the net, i'm sure there's still IC that mixe 2 signal together without you have to care about synchronise them together like the old STV5730A wich seems to be obsolete or hard to find for now.

May ST9936 or ST9937 be a good start for easy solution. Seems also hard to find them too.

regards

Melanie
- 22nd October 2004, 11:43
You don't actually need any of these modules or video processor chips. Those options are manufactured for technicians and hobbyists that are clueless in video theory and can't do it otherwise (quite apart from the fact that one of those chips on their own probably costs more than the rest of all the other components combined!).

1. What you DO need is a sync separator chip... anything cheap and cheerful that you can get your hands on... LM1881 springs to mind but it doesn't have to be. That chip will provide the Line and Frame timing signals from your Video Input so the PIC knows (a) the Start of the Display Page (Frame), and (b) where it is on the Page (Line) and (c) if the video is being interlaced.

2. Then all you need is a method of mixing the signal generated by the PIC back with the incoming video, to produce a combined Video Out. A 1 cent Transistor and a small splattering of Resistors is about as simple as I can figure it...

The rest is all done in software, with only one exception... if you have a large alphabet of characters, you may need an external EEPROM to hold the character pattern (font) for the display unless you chose a PIC with a sizeable memory in which to build the font table.

Melanie

mister_e
- 23rd October 2004, 00:34
Of course that's a lot of other way to do this. As melanie said It depend of your knowledge on video, the time you have to spend on (developpement, Character database,font, special character, and more.....)... thats for sure. LM1881 is one of those cheap IC i use in the past and it's working really well + you can find it almost anywhere for a few $.

You can mix your video signal with high freq op amp and it give to you the benefit to adjust the gain of each signal depending if it's neat or not at the end. But a few cents transistor+load of resistor may do the job too.

if you want to see how easy vdo can be done look this article i found with a few second Google search
http://www.rickard.gunee.com/projects/video/pic/howto.php

good luck

Ron Marcus
- 25th October 2004, 14:57
Thanks for the input. I have the LM1881, and I am using it for both the vertical and comp sync pulses. I have gone to 14.316 MHz for the uP crystal. When divided by 4, it gives me the 3.58 MHz needed to address single pixels. Even if the oscillator is out of step with the video clock, the jitter is minimal. I will experiment with stopping the oscillator to sync it up with the vertical pulse and see if there is any perceptible difference.

Thanks again,
Ron