Re: MPLAB SIM…
|
||||
---|---|---|---|---|
中級會員
|
謝謝Ryang提供參考資料…
發表於: 2007/9/17 13:07
|
|||
|
Re: MPLAB SIM…
|
||||
---|---|---|---|---|
版主
|
MPLAB SIM 的模擬輸入功能是很強大的。除了可以設定 I/O 的輸入外還可以利用 Clock 產生輸入時脈或模擬 AD & RS-232 ...等的檔案輸入方式。
有興趣研究的話可以到 MPLAB IDE 下啟動 MPLAB SIM 後,Stilmulus 裡就有此功能。詳細使用方式可以參考 MPLAB SIM 的 Help 說明,或可以看些 Web-Seminar的說明: http://techtrain.microchip.com/websem ... ents/MPLAB_SIM_092304.pdf 或是 Web-Seminar 裡的第七巷裡: http://techtrain.microchip.com/webseminars/Archived.aspx
發表於: 2007/9/17 11:55
|
|||
|
Re: MPLAB SIM…
|
||||
---|---|---|---|---|
中級會員
|
Dear C_H_M:
感謝你熱心回覆,目前GPIO設為output時,在MPLAB SIM中已可正常變更;但如果將GPIO設為input時,在MPLAB SIM還是無法變更,不過有個偷吃步就是,摸擬時先將GPIO設為outpout,測試完再將程式修正回來即可。
發表於: 2007/9/17 11:43
|
|||
|
Re: MPLAB SIM…
|
||||
---|---|---|---|---|
中級會員
|
Dear C_H_M:
我試過你的方法,將ANSEL設為00000000,但是無效,還是無法變更。不過還是很謝謝你提供意見…
發表於: 2007/9/17 8:14
|
|||
|
Re: MPLAB SIM…
|
||||
---|---|---|---|---|
中級會員
|
會一樣喔! ........ 嚇你的啦!
你的問題是因為 你正好選擇了 12F675. 它是一個內含有 ADC 的晶片. 而GP0 / GP1 / GP2 / GP4 又是 AN0 / AN1 / AN2 /AN3 ------------------------------------------------------------------ 所以當你要 GP0/ GP1 / GP2 / GP4 為 digital 的 I/O時, 要將 ANSEL 的 bit 0 (ANS0), bit1(ANS1), bit 2(ANS2), bit3(ANS3) 設定為 0 因為, ANSEL 的初始值為 0000 1111 (電源on後預設為Analog輸入喔!)
發表於: 2007/9/14 14:52
|
|||
|
MPLAB SIM…
|
||||
---|---|---|---|---|
中級會員
|
各位,想請教一個問題:
使用MPLAB SIM來摸擬程式時,為什麼有的I/O Pin可以透過watch來寫入值,有的不行? 例如… 使用12F675,透過watch可以改變GPIO5的H、L狀態,GPIO0~GPIO4則無法變更… 不知實際應用時,狀況會一樣嗎?
發表於: 2007/9/14 13:13
|
|||
|