TV Magic! - an amazing NTSC composite video demo on the worst fucking PIC ever Copyright(c) 2008 by Christopher Abad aempirei@gmail.com software this requires: gpasm (gputils) - GNU PIC Microcontroller GP Tools picp - PICStart Programmer PICSTART Plus Programmer hardware hardware you NEED: 1 PIC12F675 8-bit microcontroller 2 330 ohm resistor (R1) 1 150 ohm resistor (R2) 1 RCA jack 1 7805 +5V fixed-voltage regulator 1 12.00mhz crystal oscillator 2 22pF capacitors (10-30pF works too) (C1) 5-18VDC power supply the reason i choose to use the 7805 voltage regulator is that the I/O pins output a voltage relative to the Vss, and arent regulated in any way, which affects the voltage on the NTSC output, so regulating the input helps control the NTSC signal. optional hardware for the 'im working' indicator 1 LED (D1) 1 1000 ohm resistor (or whatever you want) (R3) the schematic is as follows: +------+ +---+ Vss <---| 7805 |--------------|1 8|---| gnd +------+ | | (R3) (D1) | +-------------|2 7|---/\/\/\--->|---| gnd | | ___ | | (R1) --- ++-||___||-+--|3 6|---/\/\/\--+ - | | | | (R2) | gnd +-)|-+-|(-+ |4 5|---/\/\/\--+---> + RCA - <---| gnd C1 | C1 | | --- +---+ - gnd pin 1 - 7805 voltage regulator output pin 2 - 16.00mhz crystal oscillator pin 1 and one of the C1 pin 3 - 16.00mhz crystal oscillator pin 2 and one of the C1 pin 5 - NTSC out LO-voltage pin 6 - NTSC out HI-voltage pin 7 - LED power indicator pin 8 - ground just do: ./program-p12f675.sh some debugging hints are as follows: first and foremost, dealing with this kinda higher frequency singals, (at least higher, relative to audio) a scope helps immensely. beyond that obvious hint. ive noticed that newer TVs process the analog NTSC input digitally and try to do its best to display the input, or not display it at all, so they can be relatively picky. if you are just getting a blue screen (or whatever color your inputs are on your tv by default) then try replacing the R1 and R2 with some 10K potentiometers set up as variable resistors or voltage dividers, either way really, and then tune the nobs until you get a working TV signal. if you get a black screen when your screen is normally blue, you are at least on the right track. sometimes the TV is really picky about the ratios between sync voltage, black (darkest visible) voltage, and white (brightest visible) voltage, esp. around the VBLANK periods and the back porch of horizontal scanlines. thanks, aempirei