Re: PORTC 不會變化?
|
||||
---|---|---|---|---|
新會員
|
那我只要使用 TIMER的話 該如何寫這程式呢??
發表於: 2009/5/22 17:23
|
|||
|
Re: PORTC 不會變化?
|
||||
---|---|---|---|---|
版主
|
沒啟動 WDT 那你檢查 TO 位元,然成是不會往下執行,永遠當在:
start btfsc STATUS,NOT_TO goto start 迴圈裡。
發表於: 2009/5/22 17:09
|
|||
|
Re: PORTC 不會變化?
|
||||
---|---|---|---|---|
新會員
|
可是我沒有啟動WATCH-DOG 也會RESET IC嗎??
如果我只是要用TIMER而已的話 只要用您建議的方式 去檢查TMR0的BIT 7 就好了是嗎??
發表於: 2009/5/22 17:04
|
|||
|
Re: PORTC 不會變化?
|
||||
---|---|---|---|---|
版主
|
參照:
NOT_TO 檢測的是 Watch-Dog Timer Time Out Status, 平常在這裡坐迴圈偵測一但發生 WDT 時TO 為零,但 PIC 也被 Reset 了。所以建議改用 btfss TMR0,7 檢查 Timer0 來代替 WDT
發表於: 2009/5/22 16:57
|
|||
|
PORTC 不會變化?
|
||||
---|---|---|---|---|
新會員
|
PIC16F505程式如下
org 0x0 movwf OSCCAL initial movlw 0x0 tris PORTC movlw 0xD7 option clrf TMR0 start btfsc STATUS,NOT_TO goto start comf portc,f clrwdt clrf TMR0 goto start end 請問為何PORTC不會變化?? 感恩
發表於: 2009/5/22 16:43
|
|||
|