In this lab you will turn your ATmega32 into a song playing machine. You will build upon the work from lab 5.
You must develop a string format for specifying a songs. Your format must allow any note within three octaves of middle C to be specified. (Note: In order to generate frequencies as low as 33 Hz (C three octaves below), you'll need to modify the prescaler on the Timer/Counter1 subsystem.) In addition, you must be able to specify the length of time the note should be played. You may specify this either in milliseconds or in terms of whole, half, quarter, eighth, and sixteenth notes. You may also find it useful to introduce the concept of a rest. Your string format may look something like this (but you have complete freedom to specify it as you choose… you will be graded on this):
“Hot Crossed Buns.0e02.0d02.0c01.0e02.0d02.0c01.0c04.0c04.0c04.0c04.0d04.0d04.0d04.0d04.0e02.0d02.0c01”
where
Be sure to configure your GCC project correctly. For example, make sure that you adjust the stack pointer location, specify that the C99 standard should be used, etc…
You may choose to implement all or part of this program in C. You may reuse any code from earlier in the quarter. You must decide what functions to write and what each function should do. You are limited by the following constraints:
Each student must demonstrate the successful implementation of their program on their SunRom hardware. This demonstration is due by the end of the laboratory session.
You should indicate how much time (in minutes) you spend on this assignment in the FAST database. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent on this assignment before the due date given above. All time spent on this assignment should be entered into the week 6 column (even if you worked on it in week 5 or 7).
You should follow your instructor's instructions for your lab submission.
If you have any questions, consult your instructor.
Your grade will depend on the following: