#include<avr/io.h>
void Putch(char data)
{
while(!(UCSR0A & 0X20));
UDR0 = data;
}
int main(void)
{
char string[] = "Hello\r\n";
char *pStr;
UCSR0A = 0X00;
UCSR0B = 0B00001000;
UBRR0L = 103;
UBRR0H = 0;
pStr = string;
while(*pStr)
{
Putch(*pStr++);
}
while(1);
return 0;
}
'AVR' 카테고리의 다른 글
온도계 소스 (0) | 2009.12.03 |
---|---|
간단한 송수신 프로그램 (0) | 2009.11.11 |
스텝모터 구동 (0) | 2009.09.14 |
타이머 / 카운터 0 일반모드(실습) (0) | 2009.07.25 |
타이머 / 카운터 0 일반모드(이론) (0) | 2009.07.25 |