Created
February 4, 2016 12:11
-
-
Save SaheblalBagwan/d64fac6230cd8a35bf9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <avr/io.h> | |
int main() | |
{ | |
DDRC = 0xff; // Configure PORTC as output to connect Buzzer | |
DDRA = 0x00; // Configure PORTA as Input to read the switchs | |
PORTA = 0xff; // Enable The PullUps of PORTA. | |
while(1) | |
{ | |
PORTC = PINA; // Read the switch status and Turn ON/OFF the Buzzer | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment