/*======================================================================================
Project : UART신호를 발생하여 RS232통신포트에 데이터 패킷 출력 제어
Version : AVR2560D-V01
Date    : 2011-07-28
Author  : Kyung Nam Lee
Company : LKEMBEDDED 
Compiler: CodevisionAVR + AVRStudio
Comment: RS232통신포트에 "LK-ATmega128-C RS232 Com Test\r\n" 문자 출력하기!
======================================================================================*/
#include <mega2560.h>
#include <stdio.h> //Standard Input/Output functions
#include <delay.h>

void main(void)
{
DDRE=0X00;
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: Off
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 9600
UCSR0A=0x00;
UCSR0B=0x08;
UCSR0C=0x06;
UBRR0H=0x00;
UBRR0L=0x67;
while (1)
      {
        printf("LK-AVR2560D RS232 Serial Test\r\n");   
        delay_ms(10);

      }
}
