为什么我如果在一个定时器上用两个中断控制时间的时候,
[复制链接]
为什么我如果在一个定时器上用两个中断控制时间的时候,在温度高于27和低于27时,流水灯间隔闪烁的时间一样,都是间隔了1秒?
#include #define uchar unsigned char
#define uint unsigned int
sbit DS=P2^2;
uint temp;
uchar mm;
sbit dula=P2^6;
sbit wela=P2^7;
unsigned char code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,
0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
unsigned char code table1[]={ 0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,
0x87,0xff,0xef};
void delay(uint count)
{
uint i;
while(count)
{
i=200;
while(i>0)
i--;
count--;
}
}
void dsreset(void)
{
uint i;
DS=0;
i=103;
while(i>0)i--;
DS=1;
i=4;