Serial woes
2003-08-26 18:32:28.748022+00 by Dan Lyke 2 comments
Aaargh! I'm at my wit's freakin' end. I'm using an Atmel ATmega8515. I'm trying to get the UART to talk at 9600 N-8-1. I have standard PC hardware right next to me sending out capital "A"s at 9600 N-8-1 so that I can compare on the 'scope. The ATmega8515 is clocked at 8MHz, my initialization code is
clr temp
out UBRRH, temp
ldi temp, 51
out UBRRL, temp
clr temp
out UCSRA, temp
ldi temp, (1<<RXEN)|(1<<TXEN)
out UCSRB,temp
ldi temp, (1<<URSEL)|(1<<UCSZ0)|(1<<UCSZ1)
out UCSRC,temp
And the output seems to be about 1/10th the speed it ought to be. I realize only about two of you understand whatintheheck that was about, but if anyone's got a clue, please help me out.