Re: pic18f46j50 模擬板 RB2按鍵問題
|
||||
---|---|---|---|---|
中級會員
|
結果測了許久發現模擬板上的rb2按鍵的輸入都是high
那應該是專門用在看門狗測試用的 另外我還試過ra0、1看到 Data Sheet是用來比較器找不到關掉的地方XD 之後用了rc0、1關掉timer ck就可以了
發表於: 2009/9/24 13:14
|
|||
|
pic18f46j50 模擬板 RB2按鍵問題
|
||||
---|---|---|---|---|
中級會員
|
#include <p18f46j50.h>
config......... void main() { TRISBbits.TRISB2 = 1; TRISEbits.TRISE0 = 0; while(1) { if(!PORTBbits.RB2) PORTEbits.RE0 = 1;} } 按下板子上的rb2按鍵卻沒有動作, 請問需要再另外宣告其他東西嗎, 我看書和例子都使用tris 來宣告的, 請給我一些提示吧,謝謝。
發表於: 2009/9/22 11:58
|
|||
|