Re: 請教pic16f870 io 純輸入、岀的問題
|
||||
---|---|---|---|---|
資深會員
|
porta 是AD 腳位
預設是AD輸入 所以不會有反應 要先設定好ADCON
發表於: 2009/2/23 17:22
|
|||
|
請教pic16f870 io 純輸入、岀的問題
|
||||
---|---|---|---|---|
新會員
|
如標題,16f870 ra0-2 輸入,ra3 輸出
只是很單純的輸入、岀怎麼輸入 1 時程序都沒反應? (ra0-2 各pu-1k 接地,按鍵輸入< k1-k3 >時加入5v於ra0-2) bsf 03h,5 ;bank1 movlw 07h ; movwf ra ; bcf 03h,5 ;bank0 . . . movf ra,w ;此處為 main andlw 07h ; btfsc 03h,2 ; goto main ;按任一鍵都是執行main . . . . .
發表於: 2009/2/23 17:13
|
|||
|