器件用的是AT91M40800
写了一段用于与PC串口通信的程序,但开发板上串口没有信号输出
请问问题出在哪儿啊?
PS_PCER=ox00000004;//
PIO_PDR=0x0000C000;//DISABLE (TX0/RX0) PIO
US0_MR=0x000008C0 ;//SET MODE 8BIT 1BIT STOP MCK
US0_IDR=0XFFFFFFFF;//DISABLE INTERRUPT OF US0
US0_BRGR=65; //SET BAUD RATE (MCK 10M 9600BIT)
US0_CR=0X10C;//RESET TX0/RX0
US0_CR=0X50;//ENABLE TX0/RX0
while(1)
{
if(US0_CSR&&0x00000200) //judge buffer empty
US0_THR=0X5;
}
居然无信号输出,郁闷!!