Buzzer is a electronic device that converts the electronic signal into buzzing noise, that is applied to it. It can be used as electronic bell or as quiz buzzer in many applications around us. Here, i world like to discuss the interfacing of a small buzzer with 8051 microcontroller and how different projects can be constructed.
According to the code: The buzzer is interfaced to Port P1 of the microcontroller and simple ON/OFF program is written as an example using delay in between them. For half period, buzzer gets ON automatically and for next half period, buzzer gets OFF automatically as described in the code. One can also use the switch concept to control the ON/OFF operation of buzzer. Here, switch is connected to Port P3.0 pin and Debouncing concept is applied.
Buzzer Interfacing:
This project shows the interface with AT89S52 microcontroller to a buzzer. When a push button is pressed, the buzzer will get ON and OFF (number of times set in the code) and then stops.Circuit Diagram:
- The port P1 of the microcontroller is connected to buzzer. This type of connection is possible, if the current requirements of the buzzer is not more than 20mA. The output is in current source mode so that buzzer will turn ON when the output of the port is logic LOW. Switch is connected to port P3 which remains at logic HIGH by pull up resistor.Code:
#include "REG52.h" #define buz P1 sbit SW=P3^0; long int i; void main() { while(1) { if (SW==0) { for(i=0;i<=90000;i++); if(SW==0) { while(SW==0); buz=0x01; // ON Buzzer for(i=0;i<4500;i++); // Delay buz=0x00; // OFF Buzzer for(i=0;i<4500;i++); // Delay } } } }
According to the code: The buzzer is interfaced to Port P1 of the microcontroller and simple ON/OFF program is written as an example using delay in between them. For half period, buzzer gets ON automatically and for next half period, buzzer gets OFF automatically as described in the code. One can also use the switch concept to control the ON/OFF operation of buzzer. Here, switch is connected to Port P3.0 pin and Debouncing concept is applied.
m not getting output for the program sir
ReplyDeletei want program without switch
ReplyDeleteThanks for amazing bookmarking sites, these website helps me a lot in gaining ranking.
ReplyDeleteCheckout complete details about WHAT IS THE PROCESS OF B.TECH ADMISSION 2022?
One of my friend sent this blog to me, and he was right its amazing
ReplyDeletePlease check my website also
Top placement College in Greater Noida Details
area unit you managing your social media well? You’ll rent an expert social media management company in OKC to assist you with success manage buy facebook ads accounts
ReplyDeleteThis blog poses some great content about programming. Thanks for sharing it. Custom Packaging Boxes with Logo UK
ReplyDeleteGet the Complete Details about
ReplyDeleteB.COM COURSES IN DELHI NCR Details
LAW - Guru Nanak University Punjab
ReplyDeleteNice blog, thanks for amazing information...
ReplyDeleteWHY PURSUE BBA LLB?
Nice Blog, Thanks for sharing with us! Keep Sharing.
ReplyDeleteDo you want to buy High Brightness PCAP Touch Monitors online at affordable rate?
Buy High Brightness PCAP Touch Monitors
Industrial touchscreen displays play a crucial role in modern manufacturing processes, offering an intuitive interface for operators to interact with complex machinery and systems.
ReplyDeleteindustrial touchscreen displays
Packers and Movers in Islamabad provides Best House Shifting, Home Moving, Office Relocation, Luggage Moving Services in Islamabad and in all Pakistan like Lahore, Islamabad, Multan, Rawalpindi, Cantt, Islamabad and Packers is the Best Moving Company in Islamabad. Packers and Movers in Islamabad
ReplyDeleteThe way of explaining detail about the topic is really nice...
ReplyDeleteTop B Schools in Mumbai
Nice Blog. Thanks for sharing with us. keep sharing!!
ReplyDeleteDo you want to buy Wall Mount PCAP Touch Monitors online?
Buy Wall Mount PCAP Touch Monitors