• 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: 有關Training module講義裡的source code問題
#4
版主
版主


查看用戶資訊
範例裡Timer3 是1:1 的方式再配合Input Capture,如果輸入頻率較慢那就修改一下 Prescaler 為 1:8 , 1:64

發表於: 2009/4/27 13:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 有關Training module講義裡的source code問題
#3
新會員
新會員


查看用戶資訊
謝謝先進的回答

可是在執行此章節的SOURCE CODE 在低頻率約120HZ時LCD顯示的數字會放大這是怎麼回事?

如果可以抓取轉速 但是小弟想要做有轉速範圍的偵測
如轉速在1000rpm以上並持續增加就會推LED動作
如果轉速減少將會關閉LED動作

是否先進可以有範例程式可以提示 謝謝

發表於: 2009/4/24 16:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 有關Training module講義裡的source code問題
#2
資深會員
資深會員


查看用戶資訊
其實,你直接用就好。不太需要知道怎樣做。

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


有關Training module講義裡的source code問題
#1
新會員
新會員


查看用戶資訊
各位先進請教一下
小弟在training module的第12章節 Input Caprure講義裡的程式有些疑問

void uitoa( unsigned char *ASCII_Buf , unsigned int IntegerValue )
{
unsigned int TempValue ;
unsigned char ZeroDisable ;
unsigned int BaseQty ;
unsigned int Loop ;

ZeroDisable = 1 ;
BaseQty = 10000 ;

for ( Loop = 0 ; Loop < 4 ; Loop ++)
{
TempValue = IntegerValue / BaseQty ;

if ( TempValue > 0)
{
*ASCII_Buf++ = (unsigned char)TempValue + '0' ;
ZeroDisable = 0 ;
}
else if( ZeroDisable == 0 )
*ASCII_Buf++ = '0' ;
IntegerValue = IntegerValue - ( TempValue * BaseQty ) ;
BaseQty = BaseQty / 10 ;
}
*ASCII_Buf++ = (unsigned char)IntegerValue + '0' ;
*ASCII_Buf = (unsigned char) 0x00 ;

此段沒有註解無法了解 只知道是16進位轉換成ASCII 可否有先進可以幫忙註解一下 謝謝先進的幫忙

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

教育訓練中心

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