Close

Implementation

A project log for Dice10

How to control the 7 LEDs of a die with only 2 GPIO - a miniaturized electronic die based on ATtiny10.

timTim 11/26/2016 at 13:060 Comments

The implementation into hardware is quite straightforward. I mananged to squeeze all components into a PCB that is ony 13 mm x 19 mm. One notable trick was to use an edge connector for the SPI/TPI interface. Using a normal 6 pin header could have easily doubled the size of the board.

The software uses a timer interrupt to multiplex the 7 LEDs. The main routine calls the TinyTouchLib to poll the touchbutton. If a button press is detected, the value of the die is increased.

It turns out, that due to the small physical size, the touchbutton is somewhat unreliable and detects multiple touches when pressed. So I am using this in lieu of a random number generator...

Compiler output:

	Program Memory Usage 	:	644 bytes   62.9 % Full
	Data Memory Usage	:	7 bytes   21.9 % Full

Still some space left.


Discussions