For this lab you will write a program to make the Z8 developers kit into a ringtone player. At minimum you will need to use timers, interrupts, at least one GPIO, the serial port, and the display library you used for the last lab (but updated to display alpha-numeric characters). You should have a speaker in your lab kit (if not let me know). Connect the speaker to IO pins PC0 and PC1. An audio amplifier is not necessary. Program the Z8 to play music (although crude, it will work). Look up the frequencies for the various notes so your program is somewhat accurate. http://en.wikipedia.org/wiki/Piano_key_frequencies Your program should have two tunes included, that will play when the user presses sw1 or sw2. Pressing sw3 will play a tune that has been loaded though the serial port (through Hyperterm). The user loaded tune will be provided in a human readable format. The user can then type (or copy/paste) a new tune that will play when sw3 is pressed. For the ringtones, use RTTL (Nokia Ring Tone Transfer Language). While the tune is playing on the speaker you will also display the note/duration on the LED display (flash each note or scroll the stream of text). You should make reusable libraries for the subcomponents of this lab.
-I need to add some information to this lab. I will provide a specification for the minimum parts of the RTTL that you need to implement. I will also provide some example ringtones for your convenience.- I want you to include the tunes as ascii strings in your programs and parse the text to play the tunes (don't encode the tune as a sequence a note and timing information). There are some ringtones that your program should be able to play in a ringtone_samples.txt file but you can include your own if your would rather.
Answer these questions: