Tinkering with an ATmega168 |
|
||||||||||||||
(June 2009) I am a software developer by vocation, but I recently discovered that hardware tinkering can be just as fun... So I went ahead and spent the amazing amount of 6 Euros (!) to buy the necessary parts for tinkering with an ATmega168... Many thanks to Denilson Figueiredo for the excellent tutorial that allowed me to program the microcontroller with just a parallel port circuit. The 5.1 High Fidelity Audio in actionAfter being programmed by my code, the ATmega168 started singing the "Happy Birthday" song... The videos were taken with my mobile phone (hence the superb quality):
Schematic and codeThe schematic is... well... one buzzer added between ground and the controller's pin 24 :-)The rest of the breadboard is setup as described in Step 3 of this (I skipped step 2, since I used a PC power supply - if you connect green with any black, the supply thinks it's inside a PC and starts up. You can then use any red and black as +5V and ground). You can download the code I wrote (and its Makefile) from here. Make sure you have avr-gcc installed (if you use Debian or Ubuntu, simply apt-get install gcc-avr). If you are a coder, here's how I drive the microcontroller:
|
|
||||||||||||||