Предлагаю опробовать какие нибудь штуки и выкладывать тут описание:
http://avrhelp.mcselec.com/index.html?fm24c64_256.htm
http://avrhelp.mcselec.com/index.html?fm24c64_256.htm
Оказывается в Bascom AVR реализована функция работы с ТВ
' Serial input demo. ' NOTES: ' Uses an array of bytes for Screen RAM ' Uses Tilde char "~" = $7E for new screen $crystal = 20000000 $BAUD = 19200 ' Reserve screen variable area at start of RAM ' Assembler interrupt code has two byte variables IN BETWEEN two word variables Dim ScreenAddr1 as word at $100 Dim RAMVar1 as byte at $102 Dim RAMVar2 as byte at $103 Dim ScreenAddr2 as word at $104 ' Reserve Screen RAM - can reserve as much or as little as required Dim ScreenRAM(600) as byte at $106 Dim Addr As Word Dim CharIn as Byte Const NewScreen = $7E 'Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0 'Config is not needed unless settings differ from default On Oc2a Tvinterrupt Nosave Goto Main !.org $100 $inc Tvinterrupt , Nosize , "tvinc.bin" Return Main: ' Set up clock division - only need to do this if DIV8 fuse not set, as default fuse setting is div. by 8 Config Clockdiv = 1 ' CLKPR=$80 ' CLKPR=0 ' Setup timer 2 TCCR2B=$02 OCR2A=158 OCR2B=160 TIMSK2=&b00000110 ' Now set up sleep mode [SMCR = Sleep Mode Control Register] - must be enabled or TV code cannot work accurately SMCR=1 ' Set PORTB to all outputs for video signal DDRB=$FF ' Enable & config SPI SPCR=$54 SPSR=1 ' Init RAM variables for interrupt code RAMVar1=0 RAMVar2=0 ScreenAddr1=$106 ScreenAddr2=$106 ENABLE OC2A ' ENABLE OC2B ENABLE INTERRUPTS ' Now continue with user code Addr=1 ' Set Addr to address of first screen location Do CharIn=INKEY() If CharIn>0 then ScreenRAM(Addr)=CharIn Incr Addr ScreenRAM(Addr)=13 ' Make sure there is always an end of screen character End If If CharIn=NewScreen then Addr=1 ScreenRAM(Addr)=13 End If If Addr>599 then Addr=599 ' Make sure cannot write past end of screen Ram Loop ' Decimal {012} = $0C = END OF LINE MARKER ' Decimal {013} = $0D = END OF SCREEN MARKER ' Decimal {017} = $11 = Green on black ' Decimal {019} = $13 = Cyan on blue ' Decimal {020} = $14 = Yellow on red ' Decimal {022} = $16 = White on magenta End
У меня ща аврал на работае, но думаю если чего наковыряю, обязательно создам описание и выложу тут. Может вместе переведём.