Home / Expert Answers / Computer Science / 1-music-box-60pts-in-this-lab-you-are-going-to-implement-a-program-that-plays-the-c-major-scale-i-pa840

(Solved): 1 Music Box (60pts) In this lab, you are going to implement a program that plays the C major scale i ...



1 Music Box (60pts) In this lab, you are going to implement a program that plays the

C

major scale in a loop continuously and demonstrate it using a speaker and oscilloscope setup on Proteus. (Speaker for listening to sound you have generated and oscil- loscope for observing the frequency and duty cycle values of your waveforms). In summary, you need to generate square waves with different frequencies. (There is no need for a keypad and LCD setup for this lab). You are required to use timers in your implementation. Using delay sub- routines is not allowed! You must place the oscilloscope and speaker in your Proteus setup. You need to connect the port of 8051 that you generate waveform to both the oscilloscope and speaker. To implement how to use speakers in Proteus, refer to this video [[1]. An example setup is shown in Figure 1. If you are not observing the oscilloscope, please click 'Debug' and choose 'Reset Debug Popup Windows' before starting your simulation. Each note will be played for 0.5 seconds. The C major scale is:

CDEFGABc

(the second C note being 1 octave higher than the first). You will start from the

C5

note. So, you will play:

C_(5)D_(5)E_(5)F_(5)G_(5)A_(5)B_(5)C_(6)

. TAs will check the notes via oscilloscope, so please be sure that you generate square waveforms with correct frequencies. You will use the A440 pitch standard, i.e. A4 =440Hz. For more informa- tion on the corresponding frequencies of the notes, refer to this [page]. You need to check the frequencies of the given notes. As an example, to create the note

C_(5)

, you need to create a square waveform that has a frequency of

523Hz

and %50 duty cycle. You have to use the oscilloscope to determine whether you are generating waveform with the correct frequency value, and this will be checked during your demos via oscilloscope. You can use look-up tables and timers, but you MUST generate a wave- form with only one port. 8051 microprocessor on Protues as a

12MHz

clock frequency, so do your calculations accordingly!



We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe