CMIS 310

Lab exercise with Micro86 with peripherals

Make a Micro86 program that plays the bosun's whistle "piping the side" which is used on ship when a high ranking person is boarding. Listen to this WAV file.
The two tones are a D and Eb (a minor third) maybe three octaves above middle C. Say whaaaaat? I read it on a web site. Look at this piano tone chart to find the frequency of D7 and Eb7. Then divide 1193180 by those to get the counter value to output to port 42 of the 8254 chip that controls the speaker.

More fun with the speaker. Make a program that plays an ascending sequence of tones on the speaker. Start with a low tone and increment the frequency (which means decrease the counter) to a high tone. The speaker seems capable of only playing certain discrete tones (not the continuous range of tones) so you'll have to experiment to get something that's somewhat smooth.

Add to this the LED79 displaying the currently played tone's counter value. Extract each of the four hex digits of AX and scroll them into the LED from the right. Do so by masking all but the four bits of a hex digit, then right shifting (SHR) them to the lower four bits of the word and then use that as an index into an array of 7seg codes for the 16 hex digits:
DB 3F,06,5B,4F,66,6D,7D,07,7F,67,77,7C,39,5E,79,71
(note that 9 should be 67, not 6F as shown on the 7 segments code tool)