Closed-Caption Decoder

This is a closed-caption decoder with serial output based on a Microchip PIC16F628A. The internal comparators of the PIC16F628A are used to implement a peak detector and data slicer. The hardware was designed by Richard Ottosen, and the firmware was written by Eric Smith.

This closed-caption decoder does NOT overlay captions on video (OSD, on-screen display). If you need a device to overlay captions on video, you're going to have to look elsewhere. Zilog and other vendors make chips that do that, but I don't know of any standalone products.

We originally used a common National Semiconductor LM1881 sync separator, but we had problems with it so we switched to the Intersil (formerly Élantec) EL4581C, which is a pin-compatible improved performance part. It can be purchased from Mouser Electronics. If you want to use an LM1881 you may have to change the values of R1 and C7; see the LM1881 datasheet for details.

The earliest version of this closed-caption decoder was developed in 1994 using a PIC16C84 running at 16 MHz (out of spec!) or PIC16C61 and an external dual comparator. Rich Ottosen did an experimental conversion to the PIC16C56.

Shortly after the PIC16C84 version was completed, Microchip introduced the PIC16C622, which was similar to the PIC16C84 but added two internal comparators and was rated for 20 MHz operation. We redesigned the caption decoder to use the PIC16C622 for reduced part count, and the higher operating frequency allowed us to increase the data sampling rate for higher reliability of decoding.

More recently, Microchip introduced the PIC16F628, which in addition to the comparators offers flash program memory, data EEPROM, more timers, PWM, and a USART. This seemed like an ideal part for the caption decoder, so in late 2003 and early 2004 we redesigned the decoder yet again. The current version is intended to run on a PIC16F628A, though for development a PIC16F648A (with more memory) has been used. With a little bit of careful trimming to the code, it may be possible to use a PIC16F627A. The non-A parts may also be usable, though the configuration fuse settings might need to be changed.


The source 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 source code package also includes the schematics, bill of materials, and theory of operation doucments.

Kevin Timmerman has made substantial improvements to the firmware, which are not yet present in the version available above. Source code and documentation for his version are available at:

Related Magazine Articles

This project was partially inspired by these magazine articles:

Technical Standards

Online Resources

Information that is NOT available here

Many people have somehow inferred incorrectly from this web page that I can help them with other captioning or television related questions or problems:

Please don't waste your time and mine by emailing me questions about these topics.

On the other hand, if you have questions about this caption decoder design, feel free to contact me.

Last updated October 17, 2007

Copyright 1995, 1996, 1998, 2002, 2005, 2007 Eric Smith

hacker emblem
Best Viewed With Any Browser Valid HTML 4.01! Valid CSS!

check now

check now