mbedPG: Make Your Own Portable Game Console

Sunday, January 29th, 2012 by J.P. Armstrong Email your friend! Facebook this! Tweet this! ShareThis!ShareThis

With scrap parts, I created a Connect Four® style game using an mbed microcontroller, a cellphone LCD, and a few buttons. The circuit itself is rather easy and the Nokia LCD library is readily available online. With the right parts and two hours you can get this running on a breadboard. With a little more time, you can solder it on a RadioShack perfboard. This is a fun project that a novice can attempt. It will give them a greater understanding of serial communication and how LCDs work.

My fascination with gaming devices stems from a game console (mbedGC) some friends and I created last year. The game console connected to a regular TV and this is using a cellphone LCD screen. The LCD used connects with serial and the advantage is when graphics are drawn on the screen they stay there until overwritten. It does not need to be refreshed like a TV does. The mbedGC has to use a framebuffer that stores the pixels it wants to display to the screen and constantly refreshes the TV. This wastes time and memory. The LCD acts like a framebuffer storing the pixels for you.

The Circuit

As is, the mbedPG is a very simple device. The microcontroller connects to the Nokia LCD via serial and there are 3 buttons with pull-up resistors. When one of the buttons are pressed, it goes from HIGH to LOW state and triggers a hardware interrupt. It is important to remember both the Nokia LCD and mbed work on 3.3V logic. If you accidentally connect it to 5V you could damage both devices. The LED backlight requires 5V to work properly. It’s important to put a resistor in series with the LED to not burn it out.

Software

The code is available here.

The software utilizes the Nokia LCD Library created by Simon Ford. The Bresenham circle and line algorithms used were from easy.Filter and RosettaCode.

Demo Video

Conclusion

This is a great platform because of its simplicity. It would be great to see more games developed for it like Snake, Tetris, and Brick Breaker. If you make your own let me know! It would be great to see what the community comes up with.

About The Author

J.P. Armstrong

J.P. Armstrong

I'm the chief blogger at Armtronics. I enjoy writing articles that focus on embedded systems, microcontrollers, and programming projects that interest young engineers. Being a recent graduate, I know how some topics can be dry. It's important to point out fun and practical applications of theories engineering students learn. jparmstrong.com

Tags: , , , , ,

  • http://www.facebook.com/people/JP-Armstrong/18724616 JP Armstrong

    I could have made it truly portable by including a lithium battery charging circuit but, I find that a Duracell USB charger is a great substitution.

  • http://www.facebook.com/people/Marry-Sharon/100001990387793 Marry Sharon

     Make your own game

    http://www.gamerbreed.com

    GAMERBREED – Game creator : Make your own game for free!
    GAMERBREED gives you the power to create your own original online text-based RPG on your server.