www.pudn.com > SCI_1.0.rar > SCI_.h, change:2011-04-16,size:507b


     //初始化 
void Sci_Init() 
{                             
  SCI0BD=521;             //波特率=9600,主频80MHz 
  SCI0CR1=0x00;           //正常8位模式  无奇偶校验 
  SCI0CR2=0X2C;           //发送允许  接收中断允许 
} 
//接收中断 
void interrupt 20 SCI0_RE() 
{   
  char temp=0;  
  if(SCI0SR1_RDRF==1)     //接受到数据 
  { 
    SCI0SR1_RDRF=1; 
    temp=SCI0DRL; 
  } 
} 
//发送 
void SCI_Write_Byte(uchar Tx_L) 
{ 
   //SCI0SR1_TDRE=1;// 
   SCI0DRH=0; 
   SCI0DRL=Tx_L; 
   while(!SCI0SR1_TC); 
}