Re: PIC16F687 RA1有問題
|
||||
---|---|---|---|---|
版主
|
17F687 的 RA1 也具有 AN1/C12IN0-/VREF/ICSPCLK,
請在檢查一下 Aanlog Comparator & 參考電壓 這些模組 是否有 disable.
發表於: 2009/10/29 14:39
|
|||
|
PIC16F687 RA1有問題
|
||||
---|---|---|---|---|
初級會員
|
我用 PIC16F687 做了一個 RS-485 Protocol D 控制程式
但客戶最近發現了一個問題 用來當做 ID code 的接腳有 RA0 1 2 4 5 但 RA1 有時會出現電壓準位浮動的現象 我是設 RA1 為輸入接到一個10k ohm接地 同時再接 SW 到 VCC SW ON 時 VCC 導通到 10k ohm 接地,RA1 端應可測得10k ohm 為5V Hi SW OFF 時 RA1 端測得10k ohm 接地為 0V Lo 但是卻發生了有的板子有時候 RA1 Hi 時為1.xV,Lo 時為 0.4V 不知有什麼地方沒有設定好還是有什麼問題呢 謝謝 PS : initial function 如下 config bits = 0x0024 void Init(void) { PORTA = 0x00; PORTB = 0x00; PORTC = 0x00; ANSEL = 0x00; ANSELH = 0x00; WPUA = 0x00; IOCA = 0x00; WPUB = 0x00; IOCB = 0x00; TRISA = 0b11111111; TRISB = 0b11111111; TRISC = 0b00001000; PORTC = PORTC & 0x0f; }
發表於: 2009/10/27 16:27
|
|||
|