請教IO控制問題
|
||||
---|---|---|---|---|
新會員
|
各位前輩,小弟使用GPIO output沒問題,
可是設為Input卻有錯,實在不知為何哩? 麻煩各位前輩指教^^ 例如,RE8有並電容也接pull hi電阻10K, 但程式一直執行B.function, 不知為何呢@@ void Init_P24FJ128GA008(void) { AD1CON1 = 0x0000; //ADC Disable AD1PCFG = 0xFFFF; PORTE =0x03FF; TRISE =0x03FF; } . . . if(PORTEbits.RE8) { A.function; } else { B.function; } . .
發表於: 2007/8/9 22:37
|
|||
|