If this is your first time using the Video Critter, we reccomend the Video with Sound tutorial, which has improved graphics and audio support. This toturial is only still up for reference...
This example demonstrates how to display some simple graphics on a TV using the video routines. The example provides a good template for bigger projects.
Downloads:
After downloading the example code, unpack it, and in a terminal window run 'make' to compile the code. Then upload the resulting main.hex file to the Critter Board. The example clears the screen, draws a single pixel in the center, and then displays some text.
The video routines, in the file video.c, are picky about compiler settings (such as optimization level), so there is a version of this example with those routines precompiled. If you want to get into lower level video programming, download the version thats not precompiled.
The main.c file contains the main application. All it does is initialize the system and draw some things on the screen. The file graphis.c contains higher level graphic functions for drawing pixels and printing characters. There is lots of room for more functionality here, such as fucntions for drawing sapes. Additional functions can be based on the put_pixel function.
The low level video synthesis happens in video.c. It runs using interrupts to trigger events in the video signal. In the comming days we will be working on a more detailed tutorial on how the video system works. We are also working on some video routines that will provide sound too.