unsigned long temp;
unsigned char i;
bit sflag;
sbit ST=P3^0;
sbit OE=P3^1;
sbit EOC=P3^2;
sbit CLK=P3^3;
sbit LED1=P3^6;
sbit LED2=P3^7;
sbit SPK=P3^5;
void main(void)
{
ST=0;
OE=0;
TMOD=0x12;
TH0=0x216;
TL0=0x216;
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
TR1=1;
TR0=1;
ET0=1;
ET1=1;
EA=1;
ST=1;
ST=0;
getdata=148;
while(1)
{
;
}
}
void t0(void) interrupt 1 using 0
{
CLK=~CLK;
}
void t1(void) interrupt 3 using 0
{
TH1=(65536-4000)/256;
TL1=(65536-4000)%256;
if(EOC==1)
{
OE=1;
getdata=P0;
OE=0;
temp=(getdata*2350);
temp=temp/128;
if(temp
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/dianqi/article-35311-2.html
接下来就是投资有风险了事
喷子果然是无脑的