Toll-Free Customer Support 24/7

PIC Development Board -Buzzer

/*

* Project name:

PIC Development Board_ Buzzer

* Copyright

(c) Researchdesignlab.com

* Test configuration:

MCU: PIC16F877A

Dev.Board: PIC

Oscillator: 20.0 MHz

Software: mikroC PRO for PIC v 4.6

Developer: DD

*/

sbit BUZZER at RB0_bit; //defining PortB Pin B0 as BUZZER

void main()

{

TRISB=0x00; //defining PORTB as output port

BUZZER= 1;

Delay_ms(1000);

BUZZER= 0;

Delay_ms(1000);

while(1)

{

BUZZER=1; //binary equivalent value:00000000

Delay_ms(1000);

BUZZER=0; //binary equivalent value:11111111

Delay_ms(1000);

}

}

Back to top