Hallo
Meine Formel für einen 8MHz-ATMega32:
Und das Init für 8n1:Code:#define BAUD 38400 // 38400 Baud #define UBRR_BAUD ((F_CPU/(16*BAUD))-1)
(angelehnt an die RP6-Lib)Code:UBRRH = UBRR_BAUD >> 8; // UART 38400 Baud UBRRL = (uint8_t) UBRR_BAUD; UCSRA = 0x00; UCSRC = (1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); UCSRB = (1 << TXEN) | (1 << RXEN) | (1 << RXCIE);
Gruß
mic
Lesezeichen