Closed-Caption Decoder

This is a closed-caption decoder with serial output, based on a PIC16C71, an Élantec EL4581C sync separator, and an LM393 dual comparator (for data slicing with automatic threshold).

Rich and I have switched to using a PIC16C622, eliminating the LM393. The new version should be available here soon. More details are available below.


The code for this project is available under the terms of the Free Software Foundation's General Public License, Version 2. If you agree to the terms of the license, you may download a copy in either tar or zip format:

The distribution now contains a theory of operation document and a schematic in HPGL format. Unfortunately the schematic capture package Rich uses doesn't generate very good HPGL, and it doesn't generate PostScript at all. For the next release I will redraw the schematic in Protel Advanced Schematic and provide it in both HPGL and PostScript.

Dan Gregson has provided a schematic in JPEG format. Thanks, Dan!


Sync Separation

We originally used a common National Semiconductor LM1881 sync separator, but we had problems with it so we switched to the Élantec EL4581C, which is a pin-compatible improved performance part. It works much better.

Because the field output of the LM1881 was particularly unreliable, we ended up using only the composite sync output of the sync separator, and deriving the horizontal sync, vertical sync and the field in software. The Elantec part probably generates perfectly good sync and field outputs, but it would be more trouble than it is worth to switch back.


Using other PICs

Most of the development was done using the PIC16C84. Unfortunately fastest speed grade of the '84 is 10 MHz. We were able to run it at 16 MHz at room temperature and 5.0 V, but this is not an acceptable practice for commercial production.

Rich converted the code to run on a PIC16C56. The only advantage of the '56 is that Rich had a Parallax downloader for the '5x family, and that the '56 is cheaper than the '71. Microchip offers a '61 (which is a '71 without the A/D converter), which is priced fairly similarly to the '56. Rich points out that the '56 version of the code isn't very maintainable and the RAM is completely full.

Microchip's recently announced PIC16C62X series parts are an even better fit for this application, since they have two built-in comparators which replace the separate LM393. Rich and I recently switched over to using the PIC16C622, although a PIC16C621 would work as well. All future development and release of this design will use the '62X.

Since the '62X is available in as 20 MHz speed grade, the latest code is able to take nominally five samples per data bit (vs. four at 16 MHz), so in principle the reliability of the data recovery can be improved.


Related Magazine Articles

This project was inspired by these magazine articles:

Technical Standards


Note: I do not have any information on descrambling or decoding cable or satellite television signals, so don't bother emailing me to ask.
Back to my PIC Projects page
Back to my home page

Last updated November 22, 1998

Copyright 1995, 1996, 1998 Eric Smith

eric@brouhaha.com

Valid HTML 3.2! check now