3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Build the Penguin game system

Build the Penguin game system
Gotta love microcontrollers.They do lots of stuff ... you can find them in computer mice , traffic lights , toys , and almost all electronic devices nowadays.
Well , this is a project that pushes an 8-bit ATMega32 microcontroller to the limits.
As you guessed from the title , it is a game system. Here are some of the specifications :

*27MHz overclocked (from 16MHz) AVR ATmega32 microcontroller , with 32KB flash , 2KB RAM.I think you can also use an ATMega644.They have the same pinouts.I personally haven't tried with an atmega644.
*128x64 monochrome KS0108 based display
*4 Voice sound engine : (Sounds the same as the NES)
     *2 Variable volume square wave channels.
     *1 DDS (Direct Digital Synthesis) Wave table channel with fixed volume , that can play : Sine waves , Triangle waves , Sawtooth waves , Square waves , or any other simple waveform.
     *1 DDS White noise channel (Basically the same as the first wave table channel , but this one uses a white noise wave table).
*Frame buffer based video driver : (Penguin uses a video driver that is very advanced compared to the other graphic libraries you find on microcontrollers with KS0108 LCDs )
     *Instant color inversion effect
     *Transitions
     *Text drawing
     *Sprite drawing with fixed height of 8 and X Scaling (fast)
     *Sprite drawing with fixed height of 8 with both X and Y scaling (slow)
     *Vector graphics with rotation
     *Geometric shapes drawing : Triangle , Rectangle , Circle (no fill for any shapes)
     *Multiple background drawing (for transparent backgrounds)
     *Draw_pixel(x,y) function (pretty self-explanatory...)
The video driver uses 1KB of RAM for the frame buffer , and has around 30 FPS with a transparent background , sound engine running and 50 sprites on the screen.
There is no background limit,sprite limit or anything like this.The only bad thing is that if you draw too much stuff on the screen,it gets slower and slower.The vector graphics functions use a proprietary format that is generated by a tool you will found in the "Tools" category in this instructable.

 
Remove these adsRemove these ads by Signing Up
 

Step 1What you need (Hardware)

What you need (Hardware)
Penguin is made out of a relatively small amount of components.
You need :
ATMega32 OR ATMega644 (The Penguin code works on both)
KS0108 - Based GLCD.Those are the popular monochrome green-black or blue-white LCDs.I used the Raystar RG12864.
  9Tactile switches
5K variable resistor , for contrast adjustment
8 10K resistors
1 330Ohm resistor
A 27 MHz crystal oscillator and 2 22pf ceramic caps.
A prototyping board or breadboard, and of course , a programmer for your AVR.
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Jan 8, 2012. 7:46 PMnevdull says:
This is a great project. I never expected such smooth animation on a graphical LCD like this before. Very well done!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
10
Followers
6
Author:Vladmakesstuff
I make electronic stuff.Because I Can.