ATtiny Hacks: ATtiny10 Game – Doing More With Less

ATtiny Hacks Theme Banner

Okay, you’ve got a six-pin microcontroller with 1k of program memory, 32 bytes of SRAM, and it can’t be programmed using an In-System-Programmer. Do you think you can use it to develop a game? [Wrtlprnft] managed to build a Simon Says game based on the diminutive device that has four buttons and four LEDs. Judging from the video after the break, we’d say he nailed it!

There are so many design challenges here. First off, with only six pins total getting eight devices connected and working means doubling up on each I/O pin and using the reset pin as a doubled-up I/O. We’ve seen momentary push buttons on the same pins as LEDs before, so that’s not too hard to get working.

But if you’re using the reset pin how do you flash the thing? It doesn’t use the same ISP programming protocol that it’s bigger cousins do, so [Wrtlprnft] used an ATmega1284P to program it, hooking up to the three I/O pins and using a transistor to push 12V on the reset pin. But there’s still the matter of writing the code. It has half of the 32 registers you’d expect to find. He ended up ditching C and went straight to writing Assembly because of the diminished instruction set. It’s the first thing he’s written in Assembly, and a great way to learn the ropes.

It may not be as polished, but we do like it just as much as the Karate Chop Simon Says game which has a lot of other bells and whistles.

[youtube=http://www.youtube.com/watch?v=7bvOEQlV4Tk&w=470]

12 thoughts on “ATtiny Hacks: ATtiny10 Game – Doing More With Less

    1. I find this version more interesting and less cheatable. With the “normal” version you can just write down the additional digit after each round, if the sequence changes that’s more difficult and error-prone.

      The program already has to memorize the sequence to verify it when the user enters it, so it’s not a technical challenge.

  1. From the website: “The circuit is still in-system-programmable, the way the LEDs are wired up ensures that the LED on the reset pin only experiences a 7V reverse bias even when 12V are applied to that pin for programming, which it should survive.”

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.