AVR Tetris

Tetris, the timeless classic, is one of those concepts that someone will try to run on every conceivable hardware platform. I took on the challenge of programming a Tetris clone from the ground up using hardware I had on hand. At the heart of the build is an ATmega168 microcontroller. The game displays on a KS0108 128×64 LCD module with five momentary push switches to provide directional, rotational, and input controls. You can see the resulting monochrome action embedded after the break.

I had several goals in mind while writing the code for the game.  I wanted the code to be portable so that the size of the board and type of screen used could be easily changed. With that in mind I developed the trunk for a Nokia 3595 cellphone screen and a parallel branch for the graphic LCD. Originally I was working with an ATmega8 but upgraded so that I could operate at the 3.3v the cell phone screen required.

The firmware for the graphic LCD branch compiles to just over 6 kB which means it can still be run on a mega8. Also, the ATmega168 is the same processor used in the Arduino Duemilanove so another Tetris port is not out of the question. I just got a hold of my first Arduino so we’ll see if I find time to start a new branch in the code.

Continue reading “AVR Tetris”

CES Update: Atmega128RFA1

After posting about our visit and interview with [Vemund], the Atmel rep at CES. We got the feeling you needed to know some more. The thing that has got us pretty excited is the ATmega128RFA1(pdf) single-chip microcontroller and Zigbee radio module. It can be found in the ATmegaRFA1-EK1 development board. We look forward to seeing future projects and products involving this chip. How would you use this chip?

CES: HackaDay Interviews ATMEL

[youtube=http://www.youtube.com/watch?v=eZ9PPhRQKLs]

We got to talk to an ATMEL representative showing off the RZ600 Zigbee system for AVR systems. The system was also displaying the QTouch slider and wheel devices, all combined to create a wireless controller for a tetris game running on the development board. It was great to talk to a representative with a lot of respect and interest in the university and hacking communities.

New AVR Simulator For Linux

simavr is a software simulator for the AVR line of microcontrollers. You might be asking why anyone would write this sort of thing considering the simulator provided with AVR Studio is a wonderful tool? Well, a lot of folks don’t run Windows and don’t wish to use that development environment even if Wine or Virtualbox could make it happen.

We haven’t tried it out ourselves yet. There is a discussion thread going that reports some positive results of using simavr with GDB and AVR Eclipse. It’s a new package, but so far it seems to have put its best foot forward. Currently there is support for ATtiny25/45/85, ATtiny13, ATmega48/88/168, andATmega164/324/644 chips. Several of the common on-chip peripherals are already supported with the others on the way.

Have you tried it out? Let us know what you think in the comments.

[IC Photo]

Electronic Guitar Pick Tunes The Strings For You

The Stimmmopped is an electronic guitar tuner made to be used as a guitar pick. This uses two LEDs synchronized to blink at the exact frequency of the string you are tuning. Pluck the string with the corner of the PCB and then shine the light on the string you are tuning. As the vibrating string moves back and forth it will only pick up the spot of light when the frequency matches that of the blinking LED. Once in tune, both red lights will appear to be constantly illuminated and immobile on the string.

An Atmel ATmega8 is used to control the device, interfacing with two buttons and a seven-segment display to choose the pitch currently being tuned. Gibson has a robotic guitar that features an auto-tuning mode, but if you don’t want to shell that much this low cost and simple build is for you.

[Thanks Sören]

Building Capacitive Sensitive Floor Tiles

That title’s a mouthful but you’re already familiar with the technology and application of foot pads as sensors in games like Dance Dance Revolution. The usbddr project sought to make a USB connected DDR controller from scratch. The microcontroller used is an Atmel ATmega8 running the V-USB firmware for connectivity and uses the analog to digital converts to read in data from the capacitive sensors.

The physical implementation is cleaver. The base plate has a capacitor plate attached to the top of it and the tile has the other capacitor plate attached to the bottom of it. The two are separated by some weather-stripping which is spongy enough to allow compression, bringing the two capacitor plates together.

We’re not convinced of the long-term durability of the system. We certainly don’t think it will hold up to very much hard-core DDR playing. But we would love to see a Super Mario RPG style puzzle to unlock the door to the ‘castle’ at a child’s birthday party.

[Thanks Hans]