• 2021-04-14
    若系统晶振频率为6MH,分析下列源程序,回答问题。
    #include
    sbit LED=P1^0;
    void main()
    {
    TMOD=0x01;
    TL0=0x83;
    TH0=0xFF;
    IE=0x82
    TR0=1;
    while(1);
    }
    void TIME0() interrupt 1
    {
    TL0=0x83;
    TH0=0xFF;
    LED=∽LED;
    }
    (1) 程序中采用的T0还是T1定时器?选择的几位计数器?
    (2) 定时器定时的时间是多少?
    (3) 程序完成的功能
  • 举一反三