3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Poor man's AVR music box

Step 4Song storage code explained

It works like this:

control:
Start timer
Wait for timer overflow
Loop a certain number of times (this is the note length)
increment note number

Song data:
is the note number =1?
if so, output the correct number out port A, PIN0, and load the note length into a register
if not, continue

is the note number=2?
...
...
ad nauseum, over 300 notes
...
...
is the song finished?
if yes, clear all registers
if not, return to the "wait for timer overflow" step, with the correct note length value in the appropriate register. It will then increment note number and return to the "song data" function.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
10
Followers
7
Author:legionlabs
I publish my failures and my successes, as my teachers have done before me. I am a member of Foulab, an independent, nonprofit research and engineering group in Montreal. Check out our webpage at...
more »