Closed-Caption Decoder using PIC16C84

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.

Closed-Caption Decoder

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:

  • Closed Captions, V-Chips, and Other VBI Data by Gary D. Robson in the January 2000 issue of Nuts & Volts
  • “Build the Text Grabber” by Kelly McArthur in the November 1994 issue of Electronics Now.A much larger and more complicated design using an 8031.
  • “Exploring the Vertical Blanking Interval” by Mark Barnes, in issue 45 (April 1994) of Circuit Cellar Ink.A “must-read”, this is a very good article regarding capturing digital data from video signals.Mark’s design is also 8031 based and uses 24 chips, but provides much more functionality. In addition to closed captioning it also decodes network time stamps, World System Teletext (WST), and North American Basic Teletext Specification (NABTS).An earlier PostScript version of the article with additional information on WST and NABT, and source code including new support for VITC is available by FTP from Circuit Cellar Ink in VBI.ZIP.
  • Circuit Cellar also published in their May 1993 issue an article on the Motorola MC68HC05CC1 chip, which is a single chip microcomputer specifically designed for closed-caption decoding.


For more detail: Closed-Caption Decoder using PIC16C84

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us: