Browsing this Thread:
1 Anonymous Users
|
Re: About Set GPIO Output
|
|
資深會員
Joined
: 2004/8/16 13:52 最後登入時間
: 2022/11/24 13:35
From 台灣台南
Group:
註冊會員
Level : 27 HP : 0 / 658 MP : 314 / 38736 EXP : 32
|
用GPIO我想應該是16F629/675吧...去看一下data sheet比較清楚... 1.A/D要關閉...預設是打開的 2.有使用到的I/O要設成輸出..應該會設定吧 3.另外就是小心BANK別切錯了..
bcf STATUS,RP0 clrf GPIO movlw 07h movwf CMCON bsf STATUS,RP0 clrf ANSEL movlw 0Ch movwf TRISIO bcf STATUS,RP0 BSF GPIO,5 BSF GPIO,4
發表於: 2007/3/29 19:43
|
|
|
About Set GPIO Output
|
|
初級會員
Joined
: 2007/3/14 12:39 最後登入時間
: 2007/7/27 15:44
Group:
註冊會員
Level : 4 HP : 0 / 78 MP : 9 / 4013 EXP : 12
|
各位高手有個問題在跟大家請教一下,就是假設我現在要Set GPIO Pin的輸出,啟動我下一級的開關,所以我程式目前是這樣寫的 , bsf GPIO,5; bcf GPIO,4; 請問一下這樣子可以嗎? 是否還有更簡潔寫法呢? 可是我觀察過GPIO的Register的值,都不會變化,這是為什麼呢?希望大家能為我解答一下。 Thk
發表於: 2007/3/26 18:05
|
|
You can view topic.
你 不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.