INSCON = Bin(00000000); //Ñ¡ÖÐBANK0
CLKCON = 0x00;
// ÅäÖÃUart¹¤×÷ÔÚģʽ1
SCON=0x50;
/*ÅäÖò¨ÌØÂʲÎÊý£¬²¨ÌØÂÊ9600*/
/* ¼ÆË㹫ʽ£º[RCAP2H,RCAP2L]=FSY/(32*²¨ÌØÂÊ) ; FSY=12.3M*/
TR2 = 0;
PCON = 0x00;
RxCON = 0X03;
T2CON = 0x30;
T2MOD = 0x00;
RCAP2H = 0xFF;
RCAP2L = 0xD9;
TH2 = 0xFF;
TL2 = 0xD9;
TR2 = 1;
ET2 = 1;
IEN0 = 0x90; |