標(biāo)題: 大家來(lái)看看 [打印本頁(yè)]

作者: piao99    時(shí)間: 2010-8-13 20:10
標(biāo)題: 大家來(lái)看看

#include<reg51.h>
#include<stdio.h>
Uart_Init();
main();
{    Uart_Init();
     EX0=1;
  EA=1;
  while(1);
}

void int0() interrupt 0 using 0
{    printf("Timer 0 overflow\n");

}


Uart_Init()
{SCON=0x52;
 TMOD=0x20;
 TCON=0x69;
 TH1=0xf3;
}

 

 

 

怎么調(diào)試不出來(lái)


作者: aphar    時(shí)間: 2010-8-28 21:17
判斷中斷源(RI=1?ORTI=1?),清除中斷,(RI和TI不會(huì)自動(dòng)清除,必須手動(dòng)),個(gè)人蹩見。其他原因沒細(xì)看了。




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1