• slider image 442
  • slider image 497
  • slider image 498
  • slider image 499
  • slider image 500
  • slider image 502
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問關於Delay
#9
新會員
新會員


查看用戶資訊
哈....感謝
已經設定好了!!

發表於: 2008/3/17 23:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#8
資深會員
資深會員


查看用戶資訊
Debugger ->Settings...
然後在OSC/Trace的標籤頁裡就會看到設定的地方
Processer Frequency
填入你要用的頻率

發表於: 2008/3/17 9:03
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#7
新會員
新會員


查看用戶資訊
Stepwatch 前要先在 Setting 選項下先設定 MPLAB SIM 的模擬頻率

請問一下,為什麼我看不到這個選項
使用7.6版

發表於: 2008/3/14 22:57
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#6
資深會員
資深會員


查看用戶資訊
參照:

jevoswang 寫到:
啟動計時器
跑 for 迴圈
停止計時器
就可以精準計算出到底跑多少時間,清楚明白跑1次迴圈的時間長度

這樣是也可以沒錯
可是MPLAB SIM就有內建stop watch功能了
何苦多此一舉呢?

畢竟啟動/停止計時器 總也是要插入幾行程式的,
而且說不定所有計時器也有可能已有別的用途了不是嗎.

發表於: 2008/3/14 15:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#5
新會員
新會員


查看用戶資訊
啟動計時器

跑 for 迴圈

停止計時器

就可以精準計算出到底跑多少時間,清楚明白跑1次迴圈的時間長度

發表於: 2008/3/14 15:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#4
版主
版主


查看用戶資訊
再補充一下:
要用 Stepwatch 前要先在 Setting 選項下先設定 MPLAB SIM 的模擬頻率後才會正確。

發表於: 2008/3/14 9:25
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#3
資深會員
資深會員


查看用戶資訊
補充:
stopwatch 用 Debugger - Select tool - MPLAB SIM 就有了

試過後有問題再問。

發表於: 2008/3/14 8:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問關於Delay
#2
資深會員
資深會員


查看用戶資訊
直接用stopwatch幫你算就好了....
反正這種Delay本來就不太準。

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


請問關於Delay
#1
新會員
新會員


查看用戶資訊
大家好
如果我要設計一個簡單的延時程式
用C寫的話,就是用一個for迴圈
例如:for(i=0;i<100;i++);
因為用C Compiler
可是我怎麼知道這樣一個for指令,到底用了多少cycle???

因為我知道執行一個 Cycle的執行時間 = 1/(Fosc/4)
之後 for 迴圈執行一圈的Cycle X 迴圈次數 X 系統執行的Cycle時間 = 總延時時間

這樣子不知道有沒有錯?

發表於: 2008/3/13 15:15
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... ]

教育訓練中心

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