上边程序有点乱
下边是注解
#define F_CPU 8000000UL
#include
#include
#define INT8U unsigned char
#define INT16U unsigned int
const INT8U SEG_CODE[]={0XC0,0Xf9,0XA4,0XB0,0X99,0X92,0X82,0XF8,0X80,0X90,0XFF};
INT8U Display_Buffer[]={0,0,0,10,};
INT8U i;
void ADC_Convert()
{
int Result;
ACSR=0X80; //关闭比较器
ADCSRA=0X00;
ADCSRA=0XC6;//选择使能,开始转换,64分频
ADCSRB=0X00;//连续转换
ADMUX=0XC6;//内部基准电压
_delay_us(100);
if (!(ADCSRA&(ADIF