求助:用过这款芯片的高手请帮帮忙看下我的配置哪里错了或是少了配置哪一项,开机的时候电压总被拉低至0.7V,以下是配置
void PORT_INITIAL()
{
EA = 0;
TA = 0xAA;
TA = 0x55;//write TA protected register
WDCON0 = 0x00;//DIS WDT
TA = 0xAA;
TA = 0x55;//write TA protected register
WDCON1 = 0x00;
TA = 0xAA;
TA = 0x55;//write TA protected register
PMCR = 0;
TA = 0xAA;
TA = 0x55;//write TA protected register
SHBDA = 0xFC;//data RAM~6K
P0M1 = 0x82;//P0.0out 0.1in 0.2~0.5double 0.6out 0.7in
P0M2 = 0x41;
P1M1 &= 0x00;
P1M2 |= 0x10;//P1.4 out
P2M1 = 0xC3;
P2M2 = 0x0C;//P2.0 2.1 2.6 2.7in 2.2out 2.3out
P3M1 = 0x02;
P3M2 = 0x01;//P3.0out 3.1in
/* P0 = 0xFF;
P1 = 0x03;
P2 = 0xFF;
P3 = 0x03;//P3.0 ON/OFF 3.1 1
*/ DIVM = 0x00;//Fsys = Fosc
CKCON = 0x18;//1/4Fosc
IE = 0x00;
}
P1.4为推挽输出的开关机控制。 |