How to read from RS232 into ATMega64

Thread Starter

premsuku

Joined Aug 19, 2008
3
Hi,

I am trying to read the message entered from 1 hyperterminal connected to UART1 and write that message into another hyperterminal connected to UART0.
Please help if some one know how to do this

Thanks
 

Thread Starter

premsuku

Joined Aug 19, 2008
3
Thanks for the reply I found the solution..

#include avrlib/uart2.h
main(){
uartInit(); // initialize UARTs (serial ports)
uartSetBaudRate(0, 115200); // set UART0 speed to 115200 baud
uartSetBaudRate(1, 115200); // set UART1 speed to 115200 baud
timerInit(); // initialize the timer system

while(1){

rprintfInit(uart0SendByte); // configure rprintf to use UART0 for output

char c = (char)uart1GetByte();
rprintfChar(c);
timerPause(500);
}
}
 
Top