By popular demand, the source code for the closed caption decoder that Rich Ottosen and I designed is now available on the web. As with my other PIC projects, it is covered by the GNU General Public License, Version 2. The URL is http://www.telebit.com/~eric/pic/caption.html A copy of the text of the web page is attached below for your convenience. Cheers, Eric http://www.telebit.com/~eric/pic/ ----------------------------------------------------------------------------- Closed-Caption Decoder This is a closed-caption decoder with serial output, based on a PIC16C71, an Elantec EL4581C sync separator, and an LM393 dual comparator (for data slicing with automatic threshold). This project was partially inspired by the article "Build the Text Grabber" by Kelly McArthur in the November 1994 issue of Electronics Now, but where Kelly used an 8031 based design requiring a total of 16 chips, we found it possible to implement essentially the same functionality with four by using a PIC. 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 obtain a copy via FTP. The code won't do you much good if you don't have the schematic. I don't yet have it available in electronic form, but if you want it send me email and I'll arrange to get it to you. Sync Separation We originally used a common National Semiconductor LM1881 sync separator (as did Kelly), but it seemed fairly unreliable so we switched to the Elantec 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 Rich has recently 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 now offers a '61 (which is a '71 without the A/D converter), which probably has comparable price 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 may be an even better fit for this application, since they have two built-in comparators which might replace the separate LM393. Other Articles Another good article regarding capturing digital data from video signals is "Exploring the Vertical Blanking Interval" by Mark Barnes, published in the April 1994 issue of Circuit Cellar Ink. Mark's design is also 8031 based and requires 24 chips, but in addition to closed captioning it also decodes network time stamps, World System Teletext (WST), and North American Basic Teletext Specification (NABTS). 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. Standards "Recommended Practice for Line 21 Data Service", ANSI/EIA-608-94, Sept. 1994 Electronic Industries Accociation 2500 Wilson Boulevard Arlington VA 22201 American National Standards Institute 11 West 42nd Street New York, NY 10036 "Television Captioning for the Deaf: Signal and Display Specifications" Engineering Report No. E-7709-C Public Broadcasting Service, May 1980 Public Broadcasting Service 1320 Braddock Place Alexandria, VA 22314 "Telecaption II Decoder Module Performance Specification" National Captioning Institute, May 1985 National Captioning Institute, Inc. 5203 Leesburg Pike Falls Church, VA 22041 FCC Regulations: 47 CFR 15.119 47 CFR 73.699