ATMEGA8 沙盘控制程序
ATMEGA818路沙盘控制程序
voiduart_init(void)//串口0初始化
{UCSR0B=0x00;//disablewhilesettingbaudrate
UCSR0A=0B00000000;//Bit1为1则倍速发送U2X=0
UCSR0C=0x06;//B00000110//奇偶模式无,八位数据位,一位停止位
UBRR0L=71;//B00011001波特率:4800Bps
UBRR0H=0x00;//误差率:0.156%
UCSR0B=0x98;
recstate=recStart;
}
voidputchar(unsigned
下载地址
用户评论