Started following some tutorial on att85 usi. Downloaded example code from make avr book.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user