]> cvs.zerfleddert.de Git - rsbs2/blob - bmc/bmc.c
serial support
[rsbs2] / bmc / bmc.c
1 #include <avr/io.h>
2 #include <stdio.h>
3 #include "usart.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 usart_init();
14
15 printf("Hallo!\n");
16
17 while(1) {
18 pb += dir;
19 PORTB = pb;
20
21 for (i = 0; i < (pb<<5); i++) {}
22
23 if ((pb == 0) || (pb == 0xff))
24 dir = -dir;
25 }
26
27 return 0;
28 }
Impressum, Datenschutz