• slider image 442
  • slider image 492
  • slider image 493
  • slider image 494
  • slider image 495
  • slider image 496
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 如何計算timer的值
#4
版主
版主


查看用戶資訊
用兩組 Input Capture 的話是可以共用一個 Time Base 的,因為計算的時間差是這是捉到的 Timer 值減去上次抓到的 Timer 值,要注意的是在 65535 的溢位處理,先判定大小後再決定誰減誰,用筆算一下就知道了。

發表於: 2009/4/6 18:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何計算timer的值
#3
初級會員
初級會員


查看用戶資訊
那麼同時捕捉頻率和PWM duty兩個訊號

可同時使用同一個timer嗎?

發表於: 2009/4/6 14:53
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何計算timer的值
#2
資深會員
資深會員


查看用戶資訊
Fcy = 7372800*2 = 14745600 Hz
進入Timer有預除64,所以timer的時鐘頻率是230400Hz,意思就是Timer每加一,經過的時間是4.3403us,那要數幾次才會到200ms。

答案是200000us/4.3403us=46079.79=46080次。

1/46080=0.217us <--- 不知道你在想什麼? XD

發表於: 2009/4/3 4:29
不要問我哪裡來,我只是個流浪天涯的工程師
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


如何計算timer的值
#1
初級會員
初級會員


查看用戶資訊
FCY 7372800 * 2

OpenTimer1( T1_ON & T1_IDLE_STOP & T1_GATE_OFF & // Timer1 的 Period 設為每 200 ms
T1_PS_1_64 & T1_SYNC_EXT_OFF & T1_SOURCE_INT ,
(long)((FCY/ 1000)* 200 )/64 ) ;

怎麼計算Timer1的Period為200ms?

我算過(((7372800x2)/1000)*200)/64)=46080

1/46080=0.217us

這樣的設定有什麼功能?

發表於: 2009/4/2 16:22
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... ]

教育訓練中心

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