About the Project
Here is a fascinating and nostalgic project that kept me up many, many nights last summer (creating it, not playing the game!). I had long thought it would be exciting to try to generate video from a PIC, and with built-in A/D converters available for the paddles, the game of Pong seemed an obvious application to prove the concept.
The most amazing thing about this project is the small number of parts. My boss joked that it involves 17 cents worth of parts and 1000 dollars worth of programming. But don’t worry — the code is free to you! That means you can build this TV pong game in a very short time, or adapt the generic “video engine” portion of the program to make your own video-from-a-PIC project.
At the heart of the circuit is a cute one-transistor driver circuit that generates the NTSC voltages for white (1v), black (.3v) and sync (0v), depending on whether the PIC pin is driven high, low, or allowed to float. With careful programming, I was able to achieve accurate NTSC timings, something most computer and video game outputs do not take the trouble to do. That means you can use this video engine with confidence in broadcast or other applications where correct timings are important.
I call this project VCR Pong because the output signal is actually NTSC composite video, and the most common way to view it is to connect it to the video in jack on a VCR. (How about that old non-HiFi machine that eats tapes? Get it out and have fun with it again!) Naturally any monitor or television capable of directly accepting a video input will work. Or, you can get a ready-made RF modulator and add it for a more traditional approach to Pong.
The code uses the Parallax instruction syntax, so you’ll either need to use Parallax’s SPASM.EXE (available for free on Parallax’s web site) or Tech-Tools’s CVASM16.EXE (available for evaluation on Tech-Tools’s web site), or here is a preassembled object file, in INXH8M format, for use with any device programmer.
For more detail: VCR Pong using PIC16C711 Microcontroller