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


Browsing this Thread:   1 Anonymous Users






Re: 請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#6
新會員
新會員


查看用戶資訊
有無人可以教下我

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


Re: 請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#5
新會員
新會員


查看用戶資訊
#include <p30F6014A.h>
#include <dsp.h>
#include "fft.h"

/* Device configuration register macros for building the hex file */
_FOSC(CSW_FSCM_OFF & XT_PLL4); /* XT with 8xPLL oscillator, Failsafe clock off */
_FWDT(WDT_OFF); /* Watchdog timer disabled */
_FBORPOR(PBOR_OFF & MCLR_EN); /* Brown-out reset disabled, MCLR reset enabled */
_FGS(CODE_PROT_OFF); /* Code protect disabled */


/* Extern definitions */
extern fractcomplex sigCmpx[FFT_BLOCK_LENGTH] /* Typically, the input signal to an FFT */
__attribute__ ((section (".ydata, data, ymemory"), /* routine is a complex array containing samples */
aligned (FFT_BLOCK_LENGTH * 2 *2))); /* of an input signal. For this example, */
/* we will provide the input signal in an */
/* array declared in Y-data space. */
/* Global Definitions */
#ifndef FFTTWIDCOEFFS_IN_PROGMEM
fractcomplex twiddleFactors[FFT_BLOCK_LENGTH/2] /* Declare Twiddle Factor array in X-space*/
__attribute__ ((section (".xbss, bss, xmemory"), aligned (FFT_BLOCK_LENGTH*2)));
#else
extern const fractcomplex twiddleFactors[FFT_BLOCK_LENGTH/2] /* Twiddle Factor array in Program memory */
__attribute__ ((space(auto_psv), aligned (FFT_BLOCK_LENGTH*2)));
#endif

int peakFrequencyBin = 0; /* Declare post-FFT variables to compute the */
unsigned long peakFrequency = 0; /* frequency of the largest spectral component */

int main(void)
{
int i = 0;
fractional *p_real = &sigCmpx[0].real ;
fractcomplex *p_cmpx = &sigCmpx[0] ;


#ifndef FFTTWIDCOEFFS_IN_PROGMEM /* Generate TwiddleFactor Coefficients */
TwidFactorInit (LOG2_BLOCK_LENGTH, &twiddleFactors[0], 0); /* We need to do this only once at start-up */
#endif

for ( i = 0; i < FFT_BLOCK_LENGTH; i++ )/* The FFT function requires input data */
{ /* to be in the fractional fixed-point range [-0.5, +0.5]*/
*p_real = *p_real >>1 ; /* So, we shift all data samples by 1 bit to the right. */
*p_real++; /* Should you desire to optimize this process, perform */
} /* data scaling when first obtaining the time samples */
/* Or within the BitReverseComplex function source code */

是不是這一個
我想問怎樣改才能a/d input到fft

發表於: 2009/10/25 0:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#4
資深會員
資深會員


查看用戶資訊
C30有FFT的dsplib 可以呼叫使用,手冊吧!!XD

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


Re: 請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#3
新會員
新會員


查看用戶資訊
有沒有program可以做到在pic30f6014a 上運行fft

發表於: 2009/10/23 3:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#2
版主
版主


查看用戶資訊
要分析的信號是要從 AD 輸入的,將類比轉成數位後猜可以用 DSP 處理的。

發表於: 2009/10/6 12:03
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教Fast Fourier Transform (FFT) 在dspic30f6014a的program
#1
新會員
新會員


查看用戶資訊
如果我想用fft在dspic30f6014a分析電壓頻率並在lcd monitor 顯示

電壓是不是從板中的a/d input 輸入作測試

Attach file:



jpg  (0.00 KB)


jpg  (0.00 KB)


jpg  (0.00 KB)


發表於: 2009/10/5 15:37

Edited by subaru1432 on 2009年10月05日 20:51: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... ]

教育訓練中心

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