UART problem with AT90S8515

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm having problems using the UART on my AT90S8515.
I want to send ASCI characters from AT90S8515 to the PC.
I am using STK200 and AVR GCC with library AVRlib from Procyon.
I am using the function "void uartSendByte (u08 txData)" to send one
The problem is that I get wrong byte in the PC.
I use hyperterminal in windows.
I have set hyperterminal to 9600 baud, 2 stop bits and no parity.
I don't know how to set these parameters on the AVR.

The code for the AT90S8515 looks like this.

#include <avr/io.h>        
#include <avr/signal.h>    
#include <avr/interrupt.h>    

#include "global.h"        
#include "uart.h"        
#include "rprintf.h"    

int main(void)

    return 0;

When AT90S8515 sends 10 to the PC i get something else.

Re: UART problem with AT90S8515

Quoted text here. Click to load it

Be sure to RTFM regarding that third-party library function.  And not
just that single function, either.

Quoted text here. Click to load it

Well, what *do* you get, then?  The less details you give, the harder
it gets for anybody trying to help you.

Quoted text here. Click to load it

2 stop bits is quite unusual.  The usual mainstream setting is "8N1
--- 8 bit, no parity, one stop bit".  Are you sure you need 2?

Quoted text here. Click to load it

Then find out.  Or use a scope to see what the AVR does send, in the
state you get without setting any of these explicitly...

Quoted text here. Click to load it

10 is '\n', i.e. the ASCII Linefeed character --- hardly a good choice
for a test, because there are additional complication regarding it, like
CRLF <--> LF translation in various stages of the process.  Better start
out with a simple letter, e.g. 0x55 = 85 = 'U'.
Hans-Bernhard Broeker (
Even if all the snow were burnt, ashes would remain.

Re: UART problem with AT90S8515
Did you remember to put the processor clock speed in? You need to tell the
compiler the crystal speed so that it can calculate the correct baud rate.


Quoted text here. Click to load it

Site Timeline