BUZZ 2 click
PID: MIKROE-2720
BUZZ 2 click carries the CMT-8540S-SMT magnetic buzzer transducer. The buzzer’s resonant
frequency is 4kHz. The click is designed to run on either 3.3V or 5V power supply.
How the click works
The CMT-8540S-SMT magnetic buzzer is controlled by the PWM pin on the mikroBUS™ line.
You can create different sound patterns using the Sound library supported in our compilers, or
utilize the microcontroller internal PWM module to create the signal for the buzzer. Signal
frequency determines the sound pitch, and the duty cycle determines the amplitude (sound
volume).
Power supply selection
Onboard VCCIO SEL zero-ohm resistor (SMD jumper) is used to determine whether 5V or 3.3V
power supply is used. This resistor is placed in 5V position by default.
Specifications
Type
Magnetic
Applications
The click is ideal for adding audio signalization feature to your prototype device
On‐board modules CMT‐8540S‐SMT magnetic buzzer transducer
Key Features
4kHz resonant frequency
Interface
PWM
Input Voltage
3.3V or 5V
Click board size
M (42.9 x 25.4 mm)
Pinout diagram
This table shows how the pinout on BUZZ 2 click corresponds to the pinout on the
mikroBUS™ socket (the latter shown in the two middle columns).
Notes
Pin
Pin
Notes
NC
1
AN
PWM
16
PWM
PWM input
NC
2
RST
INT
15
NC
NC
3
CS
TX
14
NC
NC
4
SCK
RX
13
NC
NC
5
MISO
SCL
12
NC
NC
6
MOSI
SDA
11
NC
Power supply +3.3V
7
3.3V
5V
10
+5V
Power supply
Ground
8
GND
GND
9
GND
Ground
GND
Programming
Code examples for BUZZ 2 click, written for MikroElektronika hardware and compilers are
available on Libstock.
Code snippet
The following code snippet defines the notes and initializes the Sound library.
01 // notes
02 #define cS
261
03 #define dS
294
04 #define e
329
05 #define fS
349
06 #define g
391
07 #define gS
415
08 #define aHa 440
09 #define aS
455
10 #define b
466
11 #define cH
523
12 #define cSH 554
13 #define dH
587
14 #define dSH 622
15 #define eH
659
16 #define fH
698
17 #define fSH 740
18 #define gH
784
19 #define gSH 830
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#define aH 880
void systemInit()
{
AD1PCFG = 0xFFFF;
TRISD = 0;
}
void Buzz_2_Init()
{
Sound_Init(&LATD, 0);
}
void Buzz_2_Task()
{
Sound_Play(aHa, 500);
Sound_Play(aHa, 500);
Sound_Play(aHa, 500);
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Sound_Play(fS, 350);
Sound_Play(cH, 150);
Sound_Play(aHa, 500);
Sound_Play(fS, 350);
Sound_Play(cH, 150);
Sound_Play(aHa, 650);
delay_ms(500);
Sound_Play(eH, 500);
Sound_Play(eH, 500);
Sound_Play(eH, 500);
Sound_Play(fH, 350);
Sound_Play(cH, 150);
Sound_Play(gS, 500);
Sound_Play(fS, 350);
Sound_Play(cH, 150);
Sound_Play(aHa, 650);
}
void main()
{
systemInit();
Buzz_2_Init();
while( 1 )
{
Buzz_2_Task();
}
}
https://shop.mikroe.com/buzz‐2‐click 9‐6‐17
很抱歉,暂时无法提供与“MIKROE-2720”相匹配的价格&库存,您可以联系我们找货
免费人工找货- 国内价格
- 1+108.86127
- 5+106.68424