锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

高低优先级中断应用举例(51单片机)

时间:2024-05-25 19:37:09


; This program is edit by Chen Weiwu;           Date  2012/11/08  10:42:36;--------------------------------------------            Led0    Bit      P1.0Led1    Bit    P1.1            org    000H      ajmp   main;--------------------------      ORG    003H      AJMP   INTERRUPT0      ;--------------------------      ORG    013H      AJMP   INTERRUPT1      ;-----Initiation-----InterType:  SETB   EA      Setb   IT0      Setb   EX0      CLR    PX0      Setb   IT1      Setb   EX1      Setb   PX1            ret;--------------------     INTERRUPT0:        clr    led0      jnb    int0,$      RETI      INTERRUPT1:        clr    led1      jnb    int1,$      setb      led1       RETI      ;--------------------            main:           acall   InterType      Mainloop:   setb   led0      setb   led1            Ajmp      Mainloop;--------------------              end

-电子元器件采购网(www.ruidan.com)是本土元器件目录分销商,采用“小批量、现货、样品”销售模式,致力于满足客户多型号、高质量、快速交付的采购需求。 自建高效智能仓储,拥有自营库存超过50,000种,提供一站式正品现货采购、个性化解决方案、选型替代等多元化服务。
锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章