void AD_count(void)
{
value=0;
value=ADCL; //Read 8 low bits first (important)
value=value|((unsigned int)ADCH << 8); //read 2 high bits and shift into top byte
AD_value=value;//采集到的AD值
}
其中value是unsigned int 形的全局变量,但我不明白为啥要对高位寄存器ADCH进行强制类型转换?value=value|((unsigned int)ADCH << 8); |