/*======================================================================================
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" 문자 출력하기!

※※주의사항※※
RS232 TO USB 컨버터를 이용하여 AVR2560D확장형 개발보드와 PC를 서로 연결해야 한다. 
======================================================================================*/
#include <mega2560.h>
#include <stdio.h> //Standard Input/Output functions
#include <delay.h>

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

      }
}
