Click any image for a large version
This project is a timebase corrector/standards converter with the following features:
This was my first big digital video project, done in 2001. I can be used for making clean copies of videotapes, or perhaps more interesting - perform standards conversion for recording NTSC Laserdiscs or DVDs onto PAL videotape.
A problem (for a soldering iron-wielding hobbyist) is the IC package. The SAA7114H comes in a LQFP100 package. This has 100 leads on a plastic square measuring 14mm along each edge. Soldering this is not easy, but it can be done.
I have designed a PCB pattern for an adapter board that converts the IC to 2.54 mm pin spacing. Feel free to download the UV mask as a PS file here:
Similarly to the above, here is an adapter board converting the memories to 2.54 mm pin spacing
The PIC is connected to a Seiko 2x16 character backlighted LCD display, and four pushbutton switches, which serves as the user interface. Menus and settings are shown in the display, controlled by the switches, marked (up), (<), (>), and (menu/select).
I have realized that this microcontroller is on the small side for a project like this. The texts, data tables and code just barely fits in the 1024 word flash ROM of the PIC.
Datasheets for the above ICs are easily found on the web. I have not linked them here since the URLs often change. The SAA's are 3.3V devices, but there are no problems with connecting them to the 5V memories. By the way - why are the 3.3V voltage regulators so darned expensive? I got mine for a price around 10 times that of a 7805!
Here is the schematic of the TBC circuit. It is hand-drawn, but fits
on an A4 page:
This schematic shows the minimum circuit, for operation as a TBC for interlaced PAL->PAL or NTSC->NTSC. Of course, there are lots of extra functions that can be added, and I am leaving this up to you, in case you would lime to build something similar. In addition to the circuit shown, separate analog and digital 3.3V supplies are needed, as well as a 5V digital supply.
My present design uses four memories, and thus provides a complete frame store, or an infinite TBC window. The SAA7114H has pins that can be configured to direct the data stream to the correct (odd or even) memories, but a 74LS74 IC has been added to the output side in order to decode the odd/even field ID and select which memory pair that is output enabled.
The microcontroller holds tables of data that are written to the internal registers in the SAA devices via the I2C bus when the TBC is powered up.
When doing the NTSC-PAL conversion, this full frame store cannot be used directly, since the writing point in the memory catches up with the reading point every 1/6 seconds, losing 1/25s of video. This effect makes moving video unwatchable (although still images appear perfect). The system must then revert to the design shown above. This is easily done by software control, making the SAA7114H write to both memory pairs simultaneously. This makes the output section see a memory holding only one field.
This leads to another problem when producing an interlaced PAL signal from NTSC: Since the NTSC video is written to the memory at a speed 6/5 times the read-out speed the ordering of the odd/even lines is inverted every 5 or 6 fields. In addition to the schematic shown above, some extra logic circuits are used together with the software to fix this. The logic analyzes the timing relationship between the input and output signal, and sends a signal to the microcontroller about the current field phase. If the encoder is about to output an even field which is actually an odd field at the input, it is converted by a vertical phase shift of 1/2 line. (The SAA7114H can do arbitrary vertical phase shifts of the picture, see the datasheet.) This technique looks great for most material, although some flickering can be noted on sharp vertical edges of some objects, such as subtitles. Anyway, it gives the best results that I have been able to produce, and is perfectly adequate for VHS as target media. It is still a bit experimental, and cannot be used the other way around, i.e from PAL to NTSC. To convert interlaced signals both ways, a more advanced converter should be constructed (See below).
The freeze-frame function is enabled by a simple switch, which inhibits the WE pin of the memories. I have a toggle switch function on my TBC for this. In addition, there is a switch to control the output signal in freeze frame mode (interlace/odd/even). This is because freezing both fields with a moving picture can result in a flickering still frame. This function thus allows to switch between display of both fields, just the even field or just the odd field.
There is also a 'lock' indicator LED on the front panel. This lights up if the decoder has managed to lock onto the input signal. I have set the conditions for 'lock' to mean a complete phase lock to H-sync, V-sync and color subcarrier.
Most of the functions listed at the top are completely under software control. Of the effects, inverted video is produced by setting the contrast parameter to C0, and the Mirror image effect is produced by just setting one bit of the 7114 register set.
I may be leaving some details out on this page, but if you are interested in in building a similar project, and manage to solder the SAA7114H, I am sure that you are experienced enough to sort out the rest for yourself, and also that you will want to give the circuit your own custom touch. Also, most of the information you need is in the data sheets for the chips. I do not have a documented source code for the software to put on this page, but the important thing about the software is the data tables that are written to the SAA chips on power-up, via the I2C bus.
The present design is housed in a neat 19'' 1HU box. See picture at the top.