Description: #include <reg52.h>
#include <absacc.h>
#define uchar unsigned char
#define PA8255 XBYTE[0x3ffc]
#define PB8255 XBYTE[0x3ffd]
#define PC8255 XBYTE[0x3ffe]
#define COM8255 XBYTE[0x3fff]
#define IN0 XBYTE[0x1000]
void ADC(void)
sbit cs138=P1^6
uchar AdcValue
main()
{cs138=0
COM8255=0x81
EA=1
IE=0x81
IT0=1
IN0=0
while(1)
{PA8255=PB8255=AdcValue }
}
void ADC(void) interrupt 0 using 1
{AdcValue=IN0
IN0=0
}
To Search:
File list (Check if you may need any files):
test.c
led.rar
led1.rar