micro adventures

January 10, 2010

Text scroll function for pong board

Filed under: Uncategorized — Piotr @ 1:11 am

After I had finished a “car race” for Pong board I switched to C. In my modest opinion Bascom is realy strange. As a preparation for my own pong version I needed some “printf” function. Unfortunately pong “screen” resolution does not offer too much space. 3 and a half simple characters pushed me to write a scroll version.

Get the Flash Player to see this player.

http://www.youtube.com/watch?v=ZirsktlLofI

If you are going to write any text, numbers or whatever it might be interesting for you to look at the code.

I defined almost complete ASCII character set (small letters are missing). You can scroll a text from right to the left in a defined window. The text can be placed either in the SRAM or in the PROGRAM memory. It is a simple C null terminated text. The speed of scrolling can be amended with right potentiometer. In the source code you can find also a simple string print function.

Download the AVR 4 Studio / WinAVR files from here

Powered by WordPress