dolphinlabs
...
Doplhin labs
News

Buzzer Interface


 

·         Program Statement : Interfacing of Buzzer with 89C51 microcontroller

Connections : Port P3.0= Buzzer

 

 

Hardware Connections for 8051 Board:-

1.      Give supply to 8051 board with the help of adapter

2.       Connect +5V pin of 8051 microcontroller to +5V supply and GND pin of 8051 microcontroller to GND pin of supply.

3.      Connect +5V pin of RS232 interface to +5V supply and GND pin of RS232 interface to GND pin of supply.

4.      Connect R2OUT pin of RS232 interface to RXD pin of 8051 and T2IN pin of RS232 interface to TXD pin of 8051.

5.      Connect +5V pin of buzzer interface block to +5V pin of supply and GND pin of buzzer interface block to GND pin of supply.

6.      Connect BUZZER pin of buzzer interface block to P3.0 pin of microcontroller.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Circuit Diagram:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Program Code:

#include<reg51.h>

sbit buz = P3^0;                                                   //select single bit

void delay();                                                         //delay definition

void main()

{

while(1)                                                   //infinite loop

{

buz=1;                                   //make P3.0 pin high

delay();                                  //call delay

}

}

void delay()

{

int i,j;

for(i=0;i<2000;i++);

for(j=0;j<10000;j++);

}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Get SOCIAL







SAFE & SECURE SHOPPING

visa card master card maestro card
Maverick IT Industries Pvt. Ltd.