Started following some tutorial on att85 usi. Downloaded example code from make avr book.

This commit is contained in:
Dan
2022-09-20 01:08:01 -04:00
parent d0cbc0000e
commit 361a828c46
295 changed files with 68746 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// POV toy demo framework //
// ------- Preamble -------- //
#include <avr/io.h>
#include <util/delay.h>
// -------- Functions --------- //
void POVDisplay(uint8_t oneByte) {
PORTB = oneByte;
_delay_ms(2);
}
int main(void) {
// -------- Inits --------- //
DDRB = 0xff; /* Set up all of LED pins for output */
// ------ Event loop ------ //
while (1) { /* mainloop */
POVDisplay(0b00001110);
POVDisplay(0b00011000);
POVDisplay(0b10111101);
POVDisplay(0b01110110);
POVDisplay(0b00111100);
POVDisplay(0b00111100);
POVDisplay(0b00111100);
POVDisplay(0b01110110);
POVDisplay(0b10111101);
POVDisplay(0b00011000);
POVDisplay(0b00001110);
PORTB = 0;
_delay_ms(10);
} /* end mainloop */
return 0;
}