In this lab, we will make a PWM based audio player. Users will be able play 8 different songs, stop and replay songs, adjust song volume, and display the name of a song on an LCD. Status of the audio player will be displayed on 3 LEDs. A block diagram of the overall system is shown below.
Block diagram of Lab 4. The dashed boxes indicate the primary functions used to control the elements inside the box. There are two threads, one to update the LCD and LEDs, and another to receive inputs from the buttons. Songs are played using an interrupt service routine (ISR).
This will be a group lab. Each group will need:
Resistors, capacitors, potentiometers, and speakers needed for the audio amplifier are available in Singer 246.
Users should be able to select between 8 different songs that are provided for you in your Github repositories. To select a song, the user should hold down the three “song selection” buttons and then hit the “confirm” button to “lock in” the song. A user will have 5 seconds to press the confirm button again for the new song to start playing, otherwise the original song keeps playing.
Users should be able to pause and resume songs using the “play/pause” button.