Electrical Engineering Technology SUNY College of Technology, Alfred, NY ELET 2143 Embedded Controller Fundamentals Fall Semester 2007 Due: Oct. 23 & 25, 2007. NAME:__________________________ Midterm Exam: Part 2 As part of the midterm exam you will implement a project. This project is 50% of your midterm grade, the other 50% is the grade you will obtain in the written exam. In this project you will implement a piano keyboard. The piano keyboard system will work in two modes: Mode 0 : Piano mode Mode 1 : Tune mode To select the mode you will use one switch from the DIP module (sw7). If sw7 is on, the system will work in Mode 0 (piano). If the sw7 is off, then it will work in Mode 1 (tune). Connect this switch, sw7, to PA0 (input pin) of Port A in the 68HC11. Mode 0 (piano). In this mode, four push buttons will be used to simulate the piano keys. You will use the module you built in your electronic fabrication class that has push buttons. These four push buttons will play the musical notes: C4, D4, E4, F4 (each push button will play a musical note). You will use Port C of the 68HC11 to connect the push buttons. Program Port C as an input port. A speaker will be connected to PA6, output pin, of Port A, as shown in Fig. 1 Mode 1 (tune). In this mode the user can select a tune from 4 different tunes. To select a tune the user will set switches sw0 and sw1 of the DIP module. Connect sw0 and sw1 to pins PA1 and PA2 (input pins) of Port A in the 68HC11. Fig. 1 shows how the I/O modules will be connected to the parallel ports of the 68HC11. Fig. 1. Input/output ports used for the project Use the calculations you did in Lab 6 to generate the delays corresponding to each musical note. Select 4 tunes from the seven tunes given below. To enter the tunes you will generate a table using the FCB directive (refer to sec 4.4 of the textbook). Use the indexed addressing mode to retrieve the values in your table (refer to the hand out: “wave generator.asm”) Evaluation of the Project. Two parts will be evaluated in the project: I. Demonstration of the project, Tuesday Oct. 23 and Thursday Oct. 25, 2007) II. Written report, due same day as demonstration. Table I. Tunes to be played Jingle Bells E4 E4 E4 E4 E4 E4 E4 G4 C4 D4 E4 F4 F4 La Marseilleise (France) D4 D4 G4 G4 A4 A4 D5 D5 B4 G4 F4 E4 G4 B4 G4 E4 C5 Mexican Hat Dance C5 B4 C4 C5 D4 A4 E4 G4# F4 A4 G4 F4 C4 C4 A3 B3 A4 Wedding March (Mendelssohn) C5 C5 B4 F4# A4 G4 F4 D4 C4 B3 C4 D4 B3 E5 D5# E5 B4 D5 C5 A4 C4 E4 A4 B4 Fur Elise E5 D5# E4 G4 B4 La Cucaracha (Mexico) G4 G4 G4 C5 B4 C5 C5 B4 E5 A4 E5 A4 G4 G4 G4 C5 E5 E5 C5 G4 We Wish You a Merry Christmas C4 F4 F4 F4 E4 G4 C4 F4 E4 E4 A4 D4 A4 B3 B4 D4 A4 G4 G4 G4 A4 F4 G4