<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 電源與新能源 > 設計應用 > 電力系統中多通道同步采樣ADC(AD7606)與浮點(diǎn)DSP(ADSP-21479)通信的設計與實(shí)現

電力系統中多通道同步采樣ADC(AD7606)與浮點(diǎn)DSP(ADSP-21479)通信的設計與實(shí)現

作者: 時(shí)間:2011-07-05 來(lái)源:網(wǎng)絡(luò ) 收藏

4.測試結果和結論
軟件設置50K的采樣信號,對8個(gè)的數據進(jìn)行同時(shí)采樣。各模擬輸入信號分別為:5連接1KHz正弦波,其余通道接地。
4.1 測試結果
1) 利用V5.0++ 的plot窗口(V->View->Debug Windows->Plot)觀(guān)察5通道數據,
1. 通道5提取到1KHz正弦波;

image015.jpg

4.2 結論
這種連接方式只使用DSP的一個(gè)串行SPORT口即可同時(shí)讀取8路ADC的數據。但由于8路數據都通過(guò)一路數據輸出給DSP,而支持的最高串行時(shí)鐘頻率有限,模數轉換還要占用一部分采樣周期,因此串行輸出的連接下,不能工作在最高200KSPS采樣率下。
根據數據手冊,AD7606的SCLK上限為23.5MHz。FLAG信號驅動(dòng)CONVST A/B信號,單路串行輸出八通道數據。不考慮轉換時(shí)間最高采樣率可達23500000/(16×8)=183.5kHz,由于每個(gè)周期數據轉換將消耗一定時(shí)間,所以實(shí)際無(wú)法達到此速度。假設采樣周期用Tconvst表示,根據AD7606數據手冊,模數轉換時(shí)間為3.45us,所以 Tconvst-3.45us代表采樣周期中傳輸數據的時(shí)間。八通道總數據量為128個(gè)時(shí)鐘周期,所以(Tconvst-3)/128近似為每bit數據的時(shí)鐘周期。由于SCLK最大為23.5MHz,據此可以推算出此模式下最高采樣頻率:
(Tconvst(max)-3.45)/128 = 1/23.5
Tconvst(max)≈8.89us
即最高采樣率為1/ Tconvst(max) = 112KSPS
同理可知,若采用兩口同時(shí)輸出轉換數據,即啟動(dòng)2個(gè)SPORT分別讀取8個(gè)通道的數據,實(shí)際最高采樣率能達到161K SPS。

當AD7606采用并行方式輸出到DSP時(shí),即可得到最高200KSPS采樣率。
5.DSP參考代碼
1.配置SRU
// This function will setup the SRU Registers
void InitSRU(void)
{
//Generating Code for connecting : SPORT0_CLK to DAI_PIN1
SRU (HIGH, PBEN01_I);
SRU (SPORT0_CLK_O, DAI_PB01_I);

//Generating Code for connecting : SPORT0_FS to DAI_PIN4
SRU (HIGH, PBEN04_I);
SRU (SPORT0_FS_O, DAI_PB04_I);

//Generating Code for connecting : DAI_PIN5 to SPORT0_DA
SRU (LOW, PBEN05_I);
SRU (DAI_PB05_O, SPORT0_DA_I);

//Generating Code for connecting : FLAG4 to DPI_PIN1
SRU (HIGH, DPI_PBEN01_I);
SRU (FLAG4_O, DPI_PB01_I);

//Generating Code for connecting : FLAG5 to DPI_PIN2
SRU (HIGH, DPI_PBEN02_I);
SRU (FLAG5_O, DPI_PB02_I);


}
2.IRQ1 BUSY中斷服務(wù)程序
void AD7606_BUSY_IRQs(int sig_int)
{
busy++;
interrupt(SIG_SP0,Count_SPORT0_RX_IRQs);
#ifdef DMA
* (volatile int *)SPCTL0 =( SPEN_A | SLEN32 | ICLK | IFS | LAFS | SDEN_A | FSR | DITFS| LFS );
#endif
#ifdef CORE
* (volatile int *) SPCTL0 =( SLEN16 | ICLK | IFS | FSR | LAFS | LFS | DITFS);
*(volatile int *) SPCTL0 |=SPEN_A ;
#endif
}
3.SPORT初始化程序
void init_sport(){
* (volatile int *) SPCTL0 = 0;
* (volatile int *) SPCTL1 = 0;
* (volatile int *) SPMCTL0 = 0;
* (volatile int *) SPMCTL1 = 0;
SPORT_DMA_setup:

* (volatile int *) IISP0A =(int)rx_buf0a ;
* (volatile int *) IMSP0A = 1;
* (volatile int *) CSP0A = CHNUM;

//configure the sport
/* */
/* CLKDIV0=[fCCLK(266 MHz)/4xFSCLK(17 MHz)]-1 = 0x0005 */
/* FSDIV0=[FSCLK(10 MHz)/TFS(2 MHz)]-1 = 31 = 0x001F */
//13m hz1m 0x00080003;
/* Configure SPORT0 as a reciever (Rx) */
* (volatile int *) DIV0 = 0x001F0005;

}
4.SPORT 中斷程序
void Count_SPORT0_RX_IRQs(int sig_int)
{
SP0I_counter++;
#ifdef CORE
rx_buf0a[(SP0I_counter-1)*CHNUM]=(short)(*pRXSP0A);
#endif
* (volatile int *) SPCTL0 =0;
finished=1;
#ifdef DMA

if(SP0I_counter==1024){
* (volatile int *) IISP0A =(int)rx_buf0a ;
SP0I_counter=0;
}
else
* (volatile int *) IISP0A =(int)(rx_buf0a+ (SP0I_counter)*CHNUM);
* (volatile int *) IMSP0A = 1;
* (volatile int *) CSP0A = CHNUM;

#endif
interrupt(SIG_SP0,SIG_IGN);
}


數字通信相關(guān)文章:數字通信原理



上一頁(yè) 1 2 3 下一頁(yè)

評論


相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>