PIC Microcontroller RGB Video – Animations!September 10th, 2008 by Jeff
Update: For those who are interested in seeing how this is done, I have posted schematics and source along with some technical details about this project. Click here to learn more.
After two days of straight coding, this is the result – two more aliens and an animation routine that toggles between 2 images for each alien and changes aliens every n frames. The alien selection routine is implemented as a state machine and uses way too many instructions, but fit within a blank line of video so I called it good. The hardest part again was maintaining a constant number of clock cycles regardless of the program flow through the display loop. This is required to maintain the video timing and keep the LCD happy.
I also changed the image lookup table routine so that the image to be displayed is loaded during the blanking interval above the top of the visible screen. This makes the pixel display much more efficient during the field but at the cost of a bunch of memory. Now instead of execution time during the horizontal line limiting the max resolution, it’s memory instead… sometimes you can’t win. If I encoded color more efficiently the memory limitation would go away.
I need to clean up the code and add some more comments, but I’ll post the source in case anyone else is interested in learning how to generate RGB video with a PIC or wants to try a similar project.
Update: The LCD display I am using is a Sharp 4L-U4EB I bought surplus years ago. I haven’t been able to find any more of them since, does anyone have a source?
Here are some still images showing the animation sequence for each alien. Click on each for a bigger version.
Previous posts related to this project:
Also check out my flickr set, PIC Microcontroller RGB Video.