Files
AVR_Learning/Make AVR Examples/Chapter04_Bit-Twiddling/cylonEyes_counting/counting.c

16 lines
367 B
C

#include <avr/io.h> /* Defines pins, ports, etc */
#define F_CPU 1000000UL /* Sets up the chip speed for delay.h */
#include <util/delay.h> /* Functions to waste time */
#define DELAYTIME 100
int main(void) {
DDRB = 0b11111111;
PORTB = 0;
while (1) {
PORTB = PORTB + 1;
_delay_ms(DELAYTIME);
}
}