Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Press KEY3 on the DE2-70 board can play the next music file stored in the SD card. Press KEY2 and KEY1 will increase and decrease the output music volume respectively. . Figure 6.16 illustrates the setup for this demonstration.
Speaker
Lock
SD Card Driver
Figure 6.15 shows the block diagram of the design of the Music Synthesizer. There are four major blocks in the circuit: DEMO_SOUND, PS2_KEYBOARD, STAFF, and TONE_GENERATOR. The DEMO_SOUND block stores a demo sound for user to play; PS2_KEYBOARD handles the users input from PS/2 keyboard; The STAFF block draws the corresponding keyboard diagram on VGA monitor when key(s) are pressed. The TONE_GENERATOR is the core of music synthesizer SOC. User can switch the music source either from PS2_KEYBOAD or the DEMO_SOUND block using SW9. To repeat the demo sound, users can press KEY1. The TONE_GENERATOR has two tones: (1) String. (2) Brass, which can be controlled by SW0. The audio codec used on the DE2-70 board has two channels, which can be turned ON/OFF using SW1 and SW2. Figure 6.17 illustrates the setup for this demonstration.
Figure 6.17.
Bit stream used: DE2_70_Synthesizer.sof or DE2-70_Synthesizer.pof Connect a PS/2 Keyboard to the DE2-70 board. Connect the VGA output of the DE2-70 board to a VGA monitor (both LCD and CRT type of monitors should work) Connect the Lineout of the DE2-70 board to a speaker. Load the bit stream into FPGA. Make sure all the switches (SW[9:0]) are set to 0 (Down Position) Press KEY1 on the DE2-70 board to start the music demo Press KEY0 on the DE2-70 board to reset the circuit Table 6.2 and 6.3 illustrate the usage of the switches, pushbuttons (KEYs), PS/2 Keyboard. Switches and Pushbuttons
Signal Name KEY[0] KEY[1] SW[0] SW[9] SW[1] SW[2] Reset Circuit Repeat the Demo Music OFF: BRASS, ON: STRING OFF: DEMO, ON: PS2 KEYBOARD Channel-1 ON / OFF Channel-2 ON / OFF Description
85
I K O L P :
#4 5 #5 6 #6 7 +1
C D E F G A
B C D E F G A B C D E F G A B
Line Out
Speaker
Keyboard Input
Keyboard
Music Synthesizer
86