Skip to content

Instantly share code, notes, and snippets.

@SaheblalBagwan
Created February 4, 2016 11:38
Show Gist options
  • Save SaheblalBagwan/f0bd96ce77327ea39989 to your computer and use it in GitHub Desktop.
Save SaheblalBagwan/f0bd96ce77327ea39989 to your computer and use it in GitHub Desktop.
#include <avr/io.h>
#include <util/delay.h>
int main()
{
DDRC = 0xff; // Configure PORTC as output
while(1)
{
PORTC = 0xff; // Turn ON the Buzzer conneted to PORTC
_delay_ms(1000); // Wait for some time
PORTC = 0x00; // Turn OFF the Buzzer connected to PORTC
_delay_ms(1000); // Wait for some time
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment