Introduction
This module features the MSGEQ7 graphic equalizer display filter.It will give your arduino ears. Sound is broken down into seven frequency bands and the peak level for each band can be read. The seven frequencies measured are as follows: 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz and 16kHz. This module can be used to create sound visualizers, detect patterns in music or add sound activation to your microcontroller.
Technical Specifications
Connection Diagram
Sample code
Arduino IDE Sample code
CVAVR Code:
using atmega128 (clock 16Mhz), usart0 (9600 baud rate), timer1 (scale clock 1024), adc. formula timer1 when use clock freq 16Mhz
Ttimer1 = Periode Timer1 TCNT1 = Register Timer1 N = Scale clock (1, 8, 64, 256 dan 1024) Tosc = Periode clock Fosc = Frekuensi clock cristal
Tosc = 1/Fosc Tosc = 1/16Mhz = 0,0000000625
Ttimer1 = Tosc * (65536 - TCNT1) * N 1 (second) = 0,0000000625 * (65536 - TCNT1) * 1024 TCNT1 = 49911 TCNT1 = C2F7 (in hex) <-- this use in //Timer 1 overflow interrupt service routine
Clock value = Fosc/N Clock value = 16Mhz/1024 = 15,625 kHz <-- this use in clock value timer1
Can use timer0 or other timer with each formula
NOTE: This code contributed by forum member Pandora.
<br><br><br>