Difference between revisions of "Buzzer with PIC18F4520 Starter Board"
(Created page with "Category:Starter PIC18F4520 In this tutorial we will see how to interface a switch and buzzer with PIC18F4520 starter board.<br> Starter PIC board comes with on board swi...") |
(No difference)
|
Latest revision as of 12:57, 10 August 2016
In this tutorial we will see how to interface a switch and buzzer with PIC18F4520 starter board.
Starter PIC board comes with on board switch connected to PORTD2 which will be used to control the buzzer.
Steps
- Configure the PORT D0 as output to control the buzzer.
- Configure the PORT D2 as input to read the switch status..
- Read the switch status.
- ON/OFF the Buzzer as per switch status.
Code