![ECE 492 Скачать руководство пользователя страница 8](http://html1.mh-extra.com/html/ece/492/492_manual_3859068008.webp)
BASE_ADDRESS, it corresponds to a tactile sensor being depressed. The sector that should be
read from the SD card is then updated depending on which sensor it was. While polling is
generally wasteful for CPU cycles, this system has no need to do any other critical computation
or tasks other than to respond to the user’s actions.
Interrupts and queues are used to handle the signals from the right glove, as these are
used to change the modes of play available, versus the actual selection of notes. The thought was
that these buttons will be less often pressed and so there is less need for polling. The current state
of the system is displayed on the LCD by “taskModeDisplay.”
“task_accelerometer” initializes the I2C bus as well as initializing the accelerometer
registers. The values in these registers configure how it will function. For this project, it is set to
detect freefall in the x-axis (1D) from the accelerometer’s point of view. This corresponds to the
axis perpendicular to the earth’s surface.
“task_sd_play” gathers all the information from the other tasks and actually plays
the .wav file from the SD card to the Line Out audio jack. The range of sectors to play,
determined from “task_which_note,” is read one sector at a time and stored in a FIFO buffer that
is fed to audio out.
Bill of Materials
Other than the items listed below, a standard wall outlet (120 V, 60 Hz) is required to
power the Altera DE2 board and external speakers if headphones are not used.
Qty
Part Name
Unit Cost
(CAD)
Total Cost
(CAD)
1
Altera/Terasic DE2 development board
http://www.altera.com/education/univ/materials/boards/de2
/unv-de2-board.html
$517.72
$517.72
2
Ribbon cable (40 & 50-pin)
$10.00
$20.00
1
Perf board
$7.50
$7.50
1 roll
Wire wrap
$10.00
$10.00
4
Capacitors (0.1 uF)
$0.25
$1.00
1 kit
Resistors (used 4x 180 ohm, 4x 1 kohm)
$7.95
$7.95
2
Headers (40 & 50-pin)
$0.20
$0.40
1
Speakers/headphones
$20.00
$20.00
1
Thin wool gloves (pair)
$5.00
$5.00
6