This can be an easy low-cost project for anyone who is looking for a fun way to break into AVR programming!
The notes of the songs are generated by a square wave outputted on a single pin of the AVR microcontroller. The LEDs that alternate on each note are connected to 2 pins each of the same chip.
Remove these ads by
Signing UpStep 1: Materials and Contruction
- 1 attiny13a
Cost: $1.40
- 2 LEDs - any LEDs will do
- 1 lithium coin cell battery
Cost: $2.00
- 1 coin cell holder
Cost: $1.25
- 1 small speaker from a musical greeting card
The two LEDs were attached directly to two pins each of the attiny13A.
Two pins are used for each LED, the second pin is set low to use as a ground connection.
The current limit of the I/O pins on the AVR will prevent the LEDs from drawing too much so a resistor is not necessary to connect in series.
The speaker used is typical of one found in a musical greeting card, any small speaker will do, given that this is outputting a square wave tone, it's not too important to worry about driving the speaker or sound quality.























Not Nice


















Visit Our Store »
Go Pro Today »



