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 byte. 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 #include #include
#include "global.h" #include "uart.h" #include "rprintf.h"
int main(void) { uartInit(); uartSetBaudRate(9600); uartSendByte(10);
return 0; }
When AT90S8515 sends 10 to the PC i get something else.