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


Browsing this Thread:   1 Anonymous Users






Re: 請問DelayxTCY()的delaytime要怎麼計算呢?
#5
資深會員
資深會員


查看用戶資訊
感謝 hellowanz 的抬愛與鼓勵!

發表於: 2007/5/23 13:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問DelayxTCY()的delaytime要怎麼計算呢?
#4
版主
版主


查看用戶資訊
參照:
Delay10KTCYx(100); // Fosc @40MHz

Delay10KTCYx(8); // Fosc @4MHz

這種的 Delay 是指延遲多少個指令週期,以 Delay10K(100) 用 40Mhz 來跑,Tcy為 (1/40MHz) * 4 = 0.1uS.
0.1uS * 10K *100 = 100mS

發表於: 2007/5/21 10:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問DelayxTCY()的delaytime要怎麼計算呢?
#3
資深會員
資深會員


查看用戶資訊
厲害~~我喜歡tonys如此精霹的說明,簡單又清楚。

to kai7310
如果計算真的算不準的話,還有一個方法,你可以反相一根OUTPUT,然後DELAY做迴圈,再用示波器去看時間就好了。

發表於: 2007/5/21 8:54
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問DelayxTCY()的delaytime要怎麼計算呢?
#2
資深會員
資深會員


查看用戶資訊
人工:
找出 Delay10KTCYx(100); 所產生的 Assembly code ,再依每個指令所需週期來算。

機器算:
MPSIM 裡有個 Stop Watch 可以幫忙算。

程式解謎:
看一下 Delay10KTCYx() 的原始碼,說明很可能就在裡面。

文字解謎:
Delay 10K Tcy x (n)→ Delay (10,000 個指令週期) x n


發表於: 2007/5/19 22:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問DelayxTCY()的delaytime要怎麼計算呢?
#1
中級會員
中級會員


查看用戶資訊
Delay10KTCYx(100); // Fosc @40MHz

Delay10KTCYx(8); // Fosc @4MHz

請問這個函式的delay time 應該如何計算呢@@?
有人可以教我計算一下嗎?
謝謝!!

發表於: 2007/5/18 20:25
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... ]

教育訓練中心

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