G 7 Virtual Guitar Gloves Presented by Elysia
G 7 Virtual Guitar Gloves Presented by: Elysia Jong Eric (Qingyue) Zhou
Functionality
Challenge • Accelerometer • 3 axis • Digital signal
• • • 2 GB FAT 16 Do not “Quick Format” Offsets for each sound files SD card stores 512 bytes each block Note A Note B Note C 500 KB 450 KB 600 KB
Calculation • Pull-up resistor for input signals – 3. 3 v/180 Ohm=18. 3 m. A < 20 m. A • Octave filters – Fast Fourier Transform (FFT) IP core. Pictures are from: http: //www. math. umn. edu/~rogness/math 1155/soundwaves/
Components
Hardware Block Diagram
Code examples #include "includes. h" #include <stdio. h> #include "altera_avalon_pio_regs. h" OS_EVENT *note_A_Q; //Interrupt handler for note A. static void isr_Note. A (void * context, alt_u 32 id){ //Capture the signal and Mask the interrupt. IOWR_ALTERA_AVALON_PIO_IRQ_MASK(NOTE_A_B ASE, 0); //Post the Queue. OSQPost(note_A_Q, NOTE_A_BASE ); //Enable the interrupt again. IOWR_ALTERA_AVALON_PIO_IRQ_MASK(NOTE_A _BASE, 0 x. F); } Int main(){ …… //register ISR alt_irq_register (NOTE_A_IRQ, NULL, isr_Note. A); alt_irq_enable(NOTE_A_IRQ); ……
Void SD_Play(){ //variable to store the msg from the queue. char* msg; INT 8 U err; While(1){ //waiting for the msg. OSQPend( note_A_Q, 0, err ); if (err == OS_NO_ERR){ /* Store the value in the Button's edge capture register in *context. */ sprintf(msg, "%d”, IORD_ALTERA_AVALON_PIO_EDGE_CAP(NOTE_A_BASE)); } } }
FSM in VHDL
Test plan • Hardware - tap sensors circuit to FPGA - Accelerometer circuit to FPGA - SD card & speakers • Software - ISRs work on notes, accelerometer, press signals - Timing skew - Memory leaks
Optional features • Wireless • Sharp/flat notes (+2 more tap sensors on right hand side, and another filter may be applied) • Virtual drum • Strumming acceleration (volume)
- Slides: 12