Professional Documents
Culture Documents
Interfacing Buzzer With LPC2148 ARM: Arm How-To Guide
Interfacing Buzzer With LPC2148 ARM: Arm How-To Guide
Buzzer
JP1
1 2 3 - Enable Buzzer
LS1 I/P P0.7
1 2 3 - Disable Buzzer
BZ
3.3V 3V3
JP1
1
2
3
1
2
3
3V3
3
R9 3K9
1 Q1
63
51
43
23
7
U16 BC847AL
R10 3K9
VDD1
VDD2
VDD3
VDDA
VREF
2
6
18 VSS1
VSS2 R11
25
VSS3 10E
42
50 VSS4
59 VSS5 31 1LS1
VSSA P0.7 2
LPC2148 buzzer
XTAL2
XTAL1
61
62
12MHz
22pf 22pf
Source Code
#include <LPC214x.h>
#include <stdio.h>
#define BUZZ 7
void Delay(void);
void Wait(void);
void main()
{
while(1)
{
IOSET0 = 1 << BUZZ;
Delay();
IOCLR0 = 1 << BUZZ;
Delay();
}
}
void Delay()
{
unsigned int i,j;
for(i=0;i<1000;i++)
for(j=0;j<700;j++);
}
General Information