I''ve been trying to get a simple thing like a serial display to work properly but whatever I do I just can't. I use a mega16, connected to a max232 and on to the computer to check the communication using LookRS232. I get a line status error.
As I go into AVR studio 4, I load the hex and run the program and then checks the USART registers it seems like the UBRRH changes as I change the UCSRC register, and it shouldn't
So, I get a lot unwanted in the UBRRH when I change in the UCSRC that Idon't want it and vise versa.
The init code for the USART looks like:
UCSRB=0x08; // Lets enable transmission
UCSRC=(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0); // asynchronys, 8 bit, 1 stop & not parity
UBRRL=0xCF; // Transferspeed - 2400
Anybody known what I'm doin' wrong?