This is an api / codebase that will generate an image on the tv screen based on the bits of sram. It usues virtually all of the avaialable sram, leaving only 39 bytes for the stack. This yeilds a field 96x82 that looks pretty good sitting on the screen.
2005.02.09: New version 0.5 includes some upgrades, changed the pixel numbering so that 0,0 is _top_ left instead of bottom. Now included 2 example application, one similar to previouse and a drawing program that uses 6 of the 8 pins on port d. Major enhancments still left to do but may have to wait a while for them.
2005.02.06: New version 0.4 includes basic bitmap support, and a character set stored in EEPROM. Example app writes the character set to the screen. It also includes a Readme talking about the hardware settup, sorry about that for you that downloaded already and don't know how to connect it to the tv.
; /---------------------------------\ ; | Draw on a TV, NTSC timing | ; | | ; | Runs at 8MHz on the ATMega16 | ; | | ; |---------------------------------| ; | John Haskins | ; \---------------------------------/
.INCLUDE "m16def.inc"
.include "8MHzM16TVMacs.inc" ; the MARCROs that help the application draw stuff to the tv, should be included at the top of the file
;------------------------------------------------------------- .CSEG ; code segment .ORG $0000 ; begining of code rjmp reset ; reset interrupt (and start) .ORG OVF0addr ; location of Timer0 Overflow ISR rjmp ISR_TOV0 ; 2 Interrupt Service Routine for Timer0 Overflow .ORG OC0addr ; location of Timer0 Compare Match ISR (shouldn't need to do this but it is what works so...) rjmp ISR_COMP0 ; 2 Interrupt Service Routine for Timer0 Overflow
reset: SetupStack ; 4 Setup the Stack ! Required or do yourself SetupXPointer ; 2 Setup X Pointer ! Required or do yourself SetupYPointer ; 2 Setup X Pointer ! Required or do yourself SetupTVState ; 3 Setup TV State Mchn ! Required SetupTimer0 ; 8 Setup Timer ! Required
; Include the TV outpu routines .include "8MHzM16TV.inc" ; The main API, has the interrupt routines and draws to the tv .include "Delay.inc" ; Delay routines .include "TVDrawChars.inc" ; EEPROM character data [/CODE] Another Link: http://www.avrfreaks.net/index.php?module=...ect&item_id=287 [CODE]
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.