导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→急急急--菜鸟求助!!!(关于Keil中断程序)

* 70499: 急急急--菜鸟求助!!!(关于Keil中断程序)

   lyp_hncs 
lyp_hncs发表的帖子 

 急急急--菜鸟求助!!!(关于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

  
回复该帖

本主题共有 2 帖,分页:>>>>>该主题的所有内容[2]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

  70502.[详细]另注:编译提示
摘要: 小弟自己随意编的中断测试程序如下: void sys_serial_isr(void) interrupt 4  {    &n......(390字)
- [lyp_hncs][1093次] 2005年1月4日

[上一篇帖子]:关于0832的输出不能达到5V的问题[讨论]俺是一个新手,现在在做一个0832模拟量的输出实验,用的
[下一篇帖子]:2个END的程序??????????、8155没搞过,不过你的程序怎么会有2个END啊,实在部明白,