本帖最后由 punch 于 2016-7-15 14:03 编辑
file:///C:UsersAdministratorAppDataRoamingTencentUsers1064672145QQWinTempRichOleG1}P{NHHO4C0AQDCMXS57EY.png下面是我的初始化程序,但是最后发现我的lcd屏上一直显示1.4v不会随着我调节电位器的阻值而改变,求大神帮忙看看问题所在。
WDTCTL = WDTPW+WDTHOLD; //关闭看门狗
P2SEL &=~ BIT6 + BIT7;
P2SEL2 &=~ BIT6 + BIT7;
LcdReset();
DispNChar(2,0,12,tishi);
Disp1Char(10,1,'V');
ADC10CTL1 |= CONSEQ_2;
ADC10CTL0 |= SREF_1 ;
//ADC10CTL0 &=~ REF2_5V;
ADC10CTL0 |= ADC10SHT_1 + MSC;
ADC10CTL1 |= ADC10SSEL_0 + ADC10DIV_0 + SHS_0;
ADC10CTL0 |= ADC10SHT_3 + MSC;
ADC10CTL1 |= INCH_3 ;
ADC10CTL0 |= ADC10ON;
ADC10AE0 &= 0x08;
ADC10CTL0 |= ADC10IE + ENC + ADC10SC;
_EINT();
此帖出自
小平头技术问答
一周热门 更多>