blob: 1911237338ce33aa2167eaa6708e34d2a257d6fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include <avr/io.h>
#include <avr/wdt.h>
#include <util/delay.h>
#include <stdlib.h>
int main (void)
{
unsigned int i, j, h;
wdt_disable();
DDRB = 0xff;
DDRD = 0xff;
PORTB = 0;
PORTD = 0;
while (1) {
for (i = 1; i < 256; i *= 2) {
PORTB = i;
for (j = 1; j < 256; j *= 2) {
PORTD = ~j;
for (h = 1; h < 1; h++) { // use "h < 4096" for visible pixels (e.g. finding soldering errors)
asm("nop");
}
}
PORTB = 0;
}
}
return 0;
}
|