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


Browsing this Thread:   1 Anonymous Users




(1) 2 »


Re: 18系列的timer1問題...
#17
版主
版主


查看用戶資訊
剛剛試了 W400 的練習二,TMR1H 很正常可以被修改動作也都正常,再檢查一下吧!

movlw    B'10001111'                16-bit mode Prescaler 1:Async mode
            movwf    T1CON                    
; Use external 32768Hz crystal Timer1 On
;
    
            
movlw    (.65536-TMR1_VAL)/.256    Calcute the MSB value for the Timer1
            movwf    TMR1H
            movlw    
(.65536-TMR1_VAL)%.256    Calcute the LSB value for the Timer1
            movwf    TMR1L
;

發表於: 2005/4/20 15:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18系列的timer1問題...
#16
資深會員
資深會員


查看用戶資訊
可是我們試過用movlw把值放到TMR1H或是直接CLRF TMR1H
都無法改變TMR1H的值(由WATCH視窗觀看都沒變化)
請問要用什麼指令才能更改呢
還是說一定要照順序
先放到TMR1H再放到TMR1L才能更新?

發表於: 2005/4/20 8:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 18系列的timer1問題...
#15
版主
版主


查看用戶資訊
1. RD16=0; 為傳統的 Timer1 與 PIC16Fxxx 相容,TMRL and TMRH 可以單獨的以八位元讀寫,但容易產生256的溢位錯誤。而 RD16=1 的16-bit Read/Write Timer Mode 就可以修正這個錯誤。

2. 16-bit Read/Write Mode 無法直接讀取 Timer 1 High Byte, 它必須間接透過 TMR1H 暫存器讀寫。 寫入方式為 : 先將 High Byte 寫到 TMR1H,Low Byte 再直接寫到 TMR1L的同時,TMR1H 的資料也會同時間被載入到 Timer1 High Byte 裡。同樣的在讀取 TMR1L 時 Timer1 High Byte 資料也會傳到 TMR1H 暫存器裡,這樣就可以以無時間誤差方式讀取 16-bit Timer1。

發表於: 2005/4/19 21:25
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


18系列的timer1問題...
#14
資深會員
資深會員


查看用戶資訊
請問一下
18系列中的timer1
可以操作成1個16位元或2個八位元
經由T1CON,RD16
而所謂的2個八位元
是否就像16位元那樣
TMR1L溢位時TMR1H就自動+1?

當他工作在16位元模式時
想要清除或更改TMR1H都無法改變
只能改變TMR1L
必須工作在2個八位元模式才能
PIC18F4320的規格書12.6節中說
當規劃在16位元模式時可以16位元讀寫
請問要如何用16位元方式讀寫啊?
這些指令不是都8位元嗎?


發表於: 2005/4/19 8:48
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... ]

教育訓練中心

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