• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 關掉TMR0
#7
新會員
新會員


查看用戶資訊
謝謝了

發表於: 2007/7/16 20:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關掉TMR0
#6
版主
版主


查看用戶資訊
謝謝提醒,我漏掉了。Data Sheet 有指出TMR2ON 可以關閉 Timer2

發表於: 2007/7/16 18:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關掉TMR0
#5
中級會員
中級會員


查看用戶資訊
PIC 16F7x TIMER2 可以關不是嗎?
TMR2ON=0;

發表於: 2007/7/16 8:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關掉TMR0
#4
版主
版主


查看用戶資訊
Timer0 & Timer2 在 PIC16F 的設計是無法被關掉停止計數,只有 Timer1 可以關閉。
可以考慮要離開中斷前重設 Timer 的計數值再清中斷旗號後離開中斷副程式

發表於: 2007/7/15 19:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關掉TMR0
#3
新會員
新會員


查看用戶資訊
謝謝 可是我還是關不掉TMR0 我關掉TMR0是寫在中斷副程式裡 可以這樣寫ㄇ

INTSUB: ;中斷副程式
BSF STATUS,RP0 ;TMR0=02 TMR2=04 INTCON=24

BCF INTCON,GIE ; TMR0=02 TMR2=05 INTCON=24

BCF INTCON,T0IE; TMR0=03 TMR2=05 INTCON=24


TMR0 TMR2 都還在動 我中斷TMR0只想跑一次 當跑到中斷副程式 就要把TMR0 關掉 TMR2繼續跑 我應該怎寫比較對??

發表於: 2007/7/15 12:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關掉TMR0
#2
版主
版主


查看用戶資訊
Timer0 無法停止其計數功能,只能將Timer0的中斷關掉不使用。T0IE=0

BCF INTCON,GIE 會將所有的中斷關閉,這和只關Timer0的中斷不同。

發表於: 2007/7/14 11:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


關掉TMR0
#1
新會員
新會員


查看用戶資訊
問個簡單問題 我用16F877

TMR0在動 我想把他關掉

我這樣寫為什不行? 我應該怎寫?

BCF INTCON,GIE

發表於: 2007/7/14 11:28
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







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.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------