#include<at89x52.h>
#include<delay.h>
#include<lcd.h>
unsigned char i;
void inter() interrupt 0
{
unsigned int temp;
float f;
TR0=0;
temp=(TH0<<8)|TL0;
temp=(temp-15535);
temp=temp*0.188;
//////
display(temp);
TR0=1;
}
void time() interrupt 1
{
unsigned char i;
TR0=0; //
P3_1=1;
TH0=0x3c;
TL0=0xaf;
for(i=0;i<5;i++);
P3_1=0;
P3_2=1;
while(!P3_2);
TR0=1;
}
void main(){
P1=0x00;
TMOD=1;
TH0=0x3c;
TL0=0xaf;
ET0=1;
EX0=1;
IT0=1;
EA=1;
TR0=1;
while(1)
{
}
}
#include<delay.h>
#include<lcd.h>
unsigned char i;
void inter() interrupt 0
{
unsigned int temp;
float f;
TR0=0;
temp=(TH0<<8)|TL0;
temp=(temp-15535);
temp=temp*0.188;
//////
display(temp);
TR0=1;
}
void time() interrupt 1
{
unsigned char i;
TR0=0; //
P3_1=1;
TH0=0x3c;
TL0=0xaf;
for(i=0;i<5;i++);
P3_1=0;
P3_2=1;
while(!P3_2);
TR0=1;
}
void main(){
P1=0x00;
TMOD=1;
TH0=0x3c;
TL0=0xaf;
ET0=1;
EX0=1;
IT0=1;
EA=1;
TR0=1;
while(1)
{
}
}
Comment