IP = 0;
IE = 0;
ES = 1;
EA = 1;
PMR |=1 ;
TRCTL = 0;
void serial_ISR () interrupt 6 //4
{
unsigned int DataToSend,send_pos;
if (RI_1)
{
RI_1 = 0;
}
else
{
TI_1 = 0; // TI = 0; //
if ( ModBus_SndCount < Serial_Bott-Serial_Pos)
{
send_pos = Serial_Pos + ModBus_SndCount ;
DataToSend = Txt_Page[send_pos];
TRCTL = 1;
SBUF1 = (unsigned char)DataToSend;
ModBus_SndCount ++;
}
}
}
主程序中用 TI_1=1 打开 不见进入中断6
不知是初始化不对,缺命令,多命令?
还是其他什么原因?请帮忙?谢谢!!!