• 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: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#11
版主
版主


查看用戶資訊
參照:
Input Capture讀取速度可以多快呢? kHz ? MHz ? 還是可以讀到GHz呢?


看一下 PIC24 Family manual Section 15. Input Capture :
裡面的第 15.11 ELECTRICAL SPECIFICATIONS 說明

ICx Input Period – Synchronous Timer : (2 * TCY + 40)/N (nS)
N = prescale value (1, 4, 16)

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#10
版主
版主


查看用戶資訊
用示波器確定轉呈方波後或直接砍成有點像方波就可以了,輸入到 INT0 的腳位因為 INT 屬於 Schmitt Trigger 輸入是不是太方正就無所謂了。利用上升緣或下降緣觸發中斷配合一個 Timer 來計時即可。每次中斷就將 Timer 讀取並將 Timer 歸零即可。

發表於: 2009/4/7 9:19
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#9
初級會員
初級會員


查看用戶資訊
版大:

謝謝版大的回答,所以我只要把正弦波轉成方波,這樣MCU就可以抓到訊號了嗎?

那我想請教一下大大,Input Capture讀取速度可以多快呢? kHz ? MHz ? 還是可以讀到GHz呢?

發表於: 2009/4/7 0:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#8
版主
版主


查看用戶資訊
輸入電壓或電流對於讀取方面建議使用 AD 來讀取。

頻率即時間則用Timer 或 Input Capture 讀取。

測量AC輸入頻率,因為頻率不高只要用硬體方式整形找出 Zero Cross 點後就可以交給INT中斷輸入腳配合一個低速的Timer就可以準確的算出 AC 輸入的頻率。當然整形過的 AC訊號最好是方波有 0 --> 5V 的變化。

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#7
初級會員
初級會員


查看用戶資訊
版大:
真是太感謝您的解答了! 原來要這樣才可以Link到!

不好意思我是新手! 剛碰PIC不久! 耽誤您這麼久時間! 真是謝謝您!

那我想再請教版大您一個問題,我在用Input Capture的時候有什麼限制嗎?

像是只能讀取振盪器所產生出來的頻率嗎?

還有輸入電壓或電流對於讀取方面會有影響嗎?

因為我想要拿來量交流電的頻率,我將他降成1伏特以下可是MCU不會產生中斷,

那不就表示說MCU對於這個訊號不會動作,是不是因為在輸入方面有哪些限制?

MCU才能讀到訊號的上升緣或是下降緣?

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#6
版主
版主


查看用戶資訊
改好了,測看看。

主要是改了 Project 裡的 include 的路徑及加入了PIC24F 的 Peripheral Library 到 Project 裡。

Attach file:


Link only for registered users

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#5
初級會員
初級會員


查看用戶資訊
版大:

這是ZIP檔,麻煩您幫小弟看一下! 謝謝!

Attach file:


Link only for registered users

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#4
版主
版主


查看用戶資訊
照dsPIC30F Peripheral Libraries 的說明如下所示,不過你所附的 rar 壓縮檔我打不開,說是資料錯誤,要不要將整個 Project 壓成 ZIP 再傳上來看看。

dsPIC30F 對 ReadCapture1 的使用方式:

3.4 ReadCapturex



Function Prototype


void ReadCapture1(unsigned int *buffer);

void ReadCapture2(unsigned int *buffer);

void ReadCapture3(unsigned int *buffer);

void ReadCapture4(unsigned int *buffer);

void ReadCapture5(unsigned int *buffer);

void ReadCapture6(unsigned int *buffer);

void ReadCapture7(unsigned int *buffer);

void ReadCapture8(unsigned int *buffer);

Include


InCap.h

Description


This function reads all the pending Input Capture buffers.

Arguments


buffer - This is the pointer to the locations where the data read from the Input Capture buffers have to be stored.

Return Value


None

Remarks:


This function reads all the pending Input Capture buffers until the buffers are empty indicated by the ICxCON<ICBNE> bit getting cleared.

Source File:


ReadCapture1.c

ReadCapture2.c

ReadCapture3.c

ReadCapture4.c

ReadCapture5.c

ReadCapture6.c

ReadCapture7.c

ReadCapture8.c

Code Example


unsigned int *buffer = 0x1900;

ReadCapture1(buffer);

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#3
初級會員
初級會員


查看用戶資訊
版大:
可是我已經有加入了,還是出現Link step failed.

#include <p24FJ128GA006.h>
#include <incap.h>

我還把"ReadCapture1"裡面所包含的C code也加進去了

void ReadCapture1(unsigned int * buffer)
{
while (IC1CONbits.ICBNE)
{
*buffer++ = IC1BUF; /* reads the input capture buffer */
}
}


可是還是出現一樣的問題!請教大大! 是哪裡有問題呢??

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


Re: [請問] Link step failed!! 我慌了! 請問大大該怎麼辦呢?
#2
版主
版主


查看用戶資訊
使用 Microcip 所提供的編函數要加入該函數的 H 檔,Input Capture 就要加入 #include <incap.h> 的定義。

有關 Input Capture 的使用範例可以參考 dsPIC30F Peripheral Module 的教材。
http://www.microchip.com.tw/modules/w ... glefile.php?cid=4&lid=229

發表於: 2009/4/6 10:55
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... ]

教育訓練中心

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