]> git.zerfleddert.de Git - rsbs2/blob - bmc/bmc.c
06a38290da134ec7f51e1ff00f3ec14a090f1a2d
[rsbs2] / bmc / bmc.c
1 #define F_CPU 1000000UL
2
3 #include <avr/io.h>
4
5 int main(void)
6 {
7 uint8_t pb = 0x00;
8 int8_t dir = 1;
9 volatile uint16_t i;
10
11 DDRB = 0xff;
12
13 while(1) {
14 pb += dir;
15 PORTB = pb;
16
17 for (i = 0; i < (pb<<5); i++) {}
18
19 if ((pb == 0) || (pb == 0xff))
20 dir = -dir;
21 }
22
23 return 0;
24 }
Impressum, Datenschutz