急急急--菜鸟求助!!!(关于Keil中断程序)
小弟初学keilC51,在原有程序上进行修改。想打开串行中断进行串口通讯,在串行初始化函数uart_init();后执行ES=0x1打开,却怎么都不行,所用芯片无法工作,而且在何处执行该命令,程序就停止在该处。不知道中断的打开还有什么特殊的要求或要注意的地方。恳请各位大虾相助,感激不尽!!!!!
原程序如下:
void main (void)
{
EA = 0;
eth_disable();
/*[System Initialization]*/
sys_Init();
/*[Timer Init] & [Active]*/
sys_timer_init(); // This subrouting only init timer but not active
// set ET0=0x01; EA=0x01; to active timer
ET0 = 0x01; /* Enable Timer 0 Interrupt*/
EA = 0x01; /*Global Interrupt Enable*/
/*[Console UART Init]*/
uart_init(); DEBUGF(DEBUG_UART, ("\r\n Uart Init......OK!"));
/*[EEPROM Init]*/
eepromInit();
ethSetMacAddr(); /* set it from config in eeprom */
/* initialize MAC */
ethInit(); printf("\r\n Ethernet Driver Init OK!");
/*[Set MY_MAC]*/
set_my_mac();
/* [GPIO Device Init] */
dev_init(); DEBUGF(DEBUG_UART, ("\r\n Device Init OK!"));
}
发表时间:2005年1月4日13:22:23