Created
May 8, 2018 20:34
-
-
Save amrsekilly/3a292fff58c775eb0174d3a2a5cf3401 to your computer and use it in GitHub Desktop.
ATm32
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
#ifndef F_CPU | |
#define F_CPU 16000000UL // 16 MHz clock speed | |
#endif | |
#include <stdint.h> | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
// make port c0 output | |
DDRC |= _BV(DDC0); | |
while(1) //infinite loop | |
{ | |
PORTC |= _BV(PC0); | |
_delay_ms(500); | |
PORTC &= ~_BV(PC0); | |
_delay_ms(300); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment