Value Filter Meter

Generate an NTSC video signal using only programmed output to a resistive network on portb.


This version watches input on pi and displays a series of average value as a bar chart.

 ;	         ATtiny45
 ;	          --v--
 ;	rst pb5 -|     |- vcc
 ;	 pi pb3 -|     |- pb2 sck
 ;	    pb4 -|     |- pb1 miso vh --470--+-- 75 ohm video
 ;	    gnd -|     |- pb0 mosi vl --1k---+
 ;	          -----        
 ;	         1.2MHz


This code was developed on a Tiny12 at 1.2MHz. Conversion to the Tiny45 has been marred by 30x more internal clock jitter in the newer part.


The Tiny45 can be configured to run at 1.2MHz, however this requires fiddling with the oscillator calibration byte to tune the oscillator above the factory setting of 1.0MHz. I've done this by adjusting the hex constant in the following setup code at the beginning of the program:

	ldi a,$c0	; calibrate (for test part)
	out osccal,a

The hex value, $c0, is for one particular part. Your parts will probably need a different value. I don't have a good way for tuning this other than to try values until the tv picture looks good. I use an oscilloscope to get into the ballpark quickly.

The program could be modified to expect a clock rate of 1.0 MHz. This would make calibration unnecessary on the Tiny45 parts.


Last edited February 6, 2009
Return to WelcomeVisitors