Step 3Program
Once you have everything set up, and the programmer attached, it's time to program. I have found that the speaker can't be attached while programming, so you should unhook that for this step. It is also very important that the crystal be attached (along with the 2 18 pF capacitors), as it will become necessary after burning the fuses.
DO NOT perform the next step (burn-fuse) if you are not using the crystal, once you do the AVR will require a crystal to operate. If you burn the fuses and you don't have a crystal your out of luck until you can get one.
Now, we need to burn the AVR's fuses (see a tutorial on AVR's for more information, and the above warning). To do so, run this command from within the same directory you have the files: main.c and Makefile.
make burn-fuse
If you are programming this thing some other way, the fuse values are:
lfuse: 0xFD
hfuse: 0xDF
Next run the next two commands to compile the program and program the AVR:
make
make program
If you want you can run this command to clean up the excesses files that were created by the make command:
make clean
And there you go! Hopefully there weren't any errors and your AVR is programmed and ready to go. By default the AVR will wait for 15 minutes before doing it's thing, then beep for 1 second every 10 minutes for an hour. The beep frequency will be 17 KHz (quite high pitched). Check out the main.c file for more information and to change these values. I made sure to add lots of comments.
raven.zip5 KB| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|









































