Hrm, I had the ATmega32A working just fine. But on the 644A I can't seem to pin
down the baud rate (or something else is wrong). According to the docs, the
'644A defaults to internal RC at 8 MHz. So, I've tried a number of variations
of settings, with U2X0 set and clear. Here's the latest:
#define F_CPU 8000000UL
#define UART_BAUD 115200
{
UBRR0 = 8; // 3; // (F_CPU / (16UL * UART_BAUD)) - 1;
UCSR0A = 0 << U2X0;
UCSR0B = 1 << RXEN0
| 1 << TXEN0
| 1 << RXCIE0;
UCSR0C = 0x0 << UMSEL00 // Async USART
| 0x0 << UPM00 // No parity
| 0 << USBS0 // 1 stop bit
| 0x3 << UCSZ00; // 8-bit
}
But I get varying forms of gibberish characteristic of baud rate mismatches.
Any suggestions?
TIA,
Rick
_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat