为什么At89c52和Acd0808没有信号传输

CSDN问答 2021-12-30 02:52:32 阅读数:756

信号 没有 at89c52 acd acd0808

img


```
#include<reg51.h>
#include<ABSACC.H>
#define AD_port XBYTE[0x7ff8]
unsigned int dig;
unsigned int v;
unsigned char seg[ ]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xFF};
void delay( )
{
unsigned char i=200;
for (i=0;i<250;i++);
}
void display( )
{
P1=seg[v%10];
P3=0xFb;
delay( );
P3=0xff;
P1=seg[v/10%10];
P3=0xfb;
delay( );
P3=0xff;
P1=seg[v/100%10];
P3=0xfe;
delay();
P3=0xff;
P1=0x7f;
P3=0xfe;
delay ();
P3=0xff;
}
int main( )
{
IT1=1;
EA=1;
EX1=1;
AD_port=0x00;
while(1)
{
delay();
}
}
int_x( )interrupt 2
{
dig=AD_port;
v=(dig*20)/51;
AD_port=0x00;
}

```*

版权声明:本文为[CSDN问答]所创,转载请带上原文链接,感谢。 https://ask.csdn.net/questions/7612891