亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? main.c

?? 基于visual dsp++開發(fā)環(huán)境
?? C
字號:
/*****************************************************************************************/
//
// Name: 	BF537 EZ-KIT interface to the AD9866 Mixed-Signal Front-End Evaluation Board 
//
/*****************************************************************************************

Analog Devices, Inc.  All rights reserved.

File Name:			Main.c

Date Modified:			01/19/05	Rev 1.3

Hardware:			BF537 EZ-KIT Board
				BF533/561 Extender Board
				AD9866 Evaluation Board

Hardware Setup:			See readme.txt
						
Purpose:				This code example demonstrates the functionality of a half-duplex
						communication scheme between an ADSP-BF537 Blackfin processor and
						an AD9866 Broadband Modem Mixed-Signal Front-End. The AD9866 has 
						two high-speed converters on board: a 12-bit 80 MSPS ADC and a 12-bit
						200 MSPS DAC. The digitized analog signal from the ADC is read into
						a DMA buffer via the Blackfin's parallel peripheral interface (PPI). 
						Optionally, some processing is performed on the data and it is then 
						transferred out to the DAC via the PPI. A double-buffering scheme 
						is used to boost processing efficiency. 
						
						
						The source code in process.c contains a commented section that performs
						an FFT followed by an inverse FFT on the input data. This acts as a 
						demonstration of how much processing head-room is available. The user may
						replace this section with any appropriate signal processing algorithms 
						as desired. However, it must be ensured that the processing latency for 
						each data buffer half does not exceed the time interval required for 
						its DMA transfer.
						
						A general-purpose timer on the Blackfin processor is used to generate
						periodic interrupts. These interrupts trigger transitions between the
						4 stages of this scheme:
						
						0. RX First Half						1. RX Second Half / Process First Half
 						2. TX First Half / Process Second Half	3. TX Second Half
						
						The timer period was chosen empirically such that it allows enough time 
						for the appropriate DMA transfers to complete. Additionally, some 
						cycles are required for the DMA controller and PPI to change direction.
						
						A more thorough statistical analysis of the latencies associated with
						the PPI/DMA turnaround will be presented in a future application note.
						
******************************************************************************************/

#include "system.h"


EX_EXCEPTION_HANDLER(ex_handler);


// Declare the DMA input and output buffers
section("L1_data_a") volatile short sPPI_RxBuffer[Number_of_ADC_channels * Number_of_Samples * 2];
section("L1_data_b") volatile short sPPI_TxBuffer[(Number_of_DAC_channels * Number_of_Samples * 2)+33];

// GLOBAL scalars

// flag to indicate which half of the output buffer has been transmitted and can be worked on by the user
// i.e. points to the half that DMA is NOT using
short half = 1;			// 0 = first half, 1 = second half

// 2-bit flag indicating which stage of execution is currently under way

short ping_pong = 0;

// semaphore to indicated that a half has been transmitted 
short stage_initialized = 0;

// store IMASK register when interrupts are disabled
int interruptLatch;

// USER CODE

section("L1_code") void main() {
	int i = 0; short temp = 0;
	
// Initialize ports

	temp = *pPORTG_FER;
	ssync();
	temp = 0xFFFF;
	*pPORTG_FER = temp;
	ssync();
	*pPORTG_FER = temp;
	ssync();
	
	temp = *pPORTF_FER;
	ssync();
	temp = 0xFFC0;
	*pPORTF_FER = temp;
	ssync();
	*pPORTF_FER = temp;
	ssync();
	
	temp = *pPORT_MUX;
	ssync();
	temp = 0x0180;
	*pPORT_MUX  = temp;
	ssync();
	*pPORT_MUX  = temp;
	ssync();
	
	// init exception handler
	register_handler(ik_exception,ex_handler);

	// Set CCLK = 594 MHz, SCLK = 118 MHz
	
	
	// Initialize PLL
	
	interruptLatch = cli();
	Set_PLL(22,5);
	sti(interruptLatch);
	
	// Set FFT twiddle factors
	init_twiddle();

    initFlags();

	InitSPI_for_AD9866();
    Init_AD9866();	

	//clear receive buffer
	
	for(i=0; i<Number_of_ADC_channels * Number_of_Samples * 2; i++) {
		sPPI_RxBuffer[i] = 0x7FF0;
	}
	
	// Fill the last 33 words of the TX buffer with midscale values
	// This ensures that the TxDAC interpolation filters are flushed 
	// before the TX path is disabled
	
	for(i= Number_of_ADC_channels * Number_of_Samples * 2; i<((Number_of_ADC_channels * Number_of_Samples * 2)+33); i++) {
		sPPI_TxBuffer[i] = 0x0;
	}
	
	// initialise Hardware


	InitInterrupts();
	
	*pPPI_CONTROL = (short) 0x0000; //Disable PPI
	*pDMA0_CONFIG = 0x0000; // Disable DMA
	*pPPI_CONTROL = (short) 0x387C;	
	*pPPI_DELAY   = 0x1B;
	*pPPI_COUNT   = Number_of_ADC_channels * Number_of_Samples*2;
	*pPPI_FRAME   = 1;
	*pDMA0_CONFIG = 0x6;
	*pDMA0_START_ADDR = (void *) sPPI_RxBuffer;
	*pDMA0_X_MODIFY = Number_of_ADC_channels * Word_Size;
	*pDMA0_X_COUNT = Number_of_Samples*2;		
	*pDMA0_CONFIG = *pDMA0_CONFIG | DMAEN;	// enable DMA  (PPI not enabled yet)
	*pPPI_CONTROL |= PORT_EN;				// enable PPI
	*pPORTFIO_SET = 0x4000;	// RX: Set Flag 14 (RXEN)
	
	initTimer();
	ssync();
	
	// MAIN loop
	// waits indefinetely for timer interrupts.
	// When an interrupt occurs, the appropriate data buffer half is processed.
	// The DMA transfers to and from the data converters are initiated in the
	// ISR which executes before the next iteration of the main loop.
	
	while(1) {

		// sync to interrupt through semaphore
		
		asm("cli %0;" : "=d" (interruptLatch)); asm("ssync;");
		ssync();
		// Check for the semaphore, and process if semaphore indicates completion
		

		if (stage_initialized == 1)  {
			if ((ping_pong == 0) | (ping_pong == 3)) // Correspond to core idle stages
				stage_initialized = 0;	 // reset the semaphore
			else {
				process();	// process appropriate data half
							// and write output to TX buffer
				stage_initialized = 0;  // reset the semaphore
			
			} 		// Inner IF
		} 		// Outer IF
		ssync();
		asm("sti %0;" : : "d" (interruptLatch)); asm("ssync;");
	}			// WHILE

}			// MAIN


int initFlags() {
	// Configure the flags 0-15 as inputs, exceptPF14, PF4, PF3 and PF2
	*pPORTFIO_DIR = *pPORTFIO_DIR & 0x401C;
	*pPORTFIO_DIR = *pPORTFIO_DIR | 0x401C;
	
	// Deassert the output flags
  	*pPORTFIO_CLEAR = 0x401C;
	asm("ssync;");
	return 0;
}



/********************************************************************************/
/***** Init_AD9866()														*****/
/***** Configures the MxFE via the SPI interface							*****/
/***** For further details on this section, consult the AD9866 data sheet   *****/
/********************************************************************************/
void Init_AD9866(void)
{ unsigned char temp =0;	 

	// Low Drive Strength, IAMP disabled
	temp = Write_Byte_to_AD9866(0xE, 0x81);
	// Interpolation Factor = 4, DAC data format = straight binary
	temp = Write_Byte_to_AD9866(0xC, 0x0);		
	// Disable CLKOUT divide-by-two
	temp = Write_Byte_to_AD9866(0x6, 0x00);	
	// Set DAC Power-Down Delay to 0 cycles, disable half-duplex power savings mode
	temp = Write_Byte_to_AD9866(0x3,0x4);
	// Set PLL x4 multiplication for DAC Clock
	temp = Write_Byte_to_AD9866(0x4,0x2);
	 
	// Interpolation Factor = 4, DAC data format = 2's complement
	// NOTE:  Uncomment the following line if executing the demonstrational FFT processing.
	 temp = Write_Byte_to_AD9866(0xC, 0x81);	
}



/* Exception handler */
EX_EXCEPTION_HANDLER(ex_handler)
{
	while(1);
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
懂色中文一区二区在线播放| 日韩欧美国产高清| 国产精品久久久久影院亚瑟| 国产久卡久卡久卡久卡视频精品| 精品国产一区二区精华| 国产伦精一区二区三区| 国产亚洲1区2区3区| 国产成人亚洲综合a∨婷婷图片| 欧美国产综合色视频| 色综合久久中文综合久久97| 亚洲一区二区三区四区五区黄| 欧美日韩成人激情| 久久爱另类一区二区小说| 久久久久久综合| av电影在线观看一区| 婷婷亚洲久悠悠色悠在线播放| 日韩欧美资源站| 国产成a人无v码亚洲福利| 1024精品合集| 91精品国产乱| 成人小视频免费观看| 亚洲曰韩产成在线| 777奇米四色成人影色区| 国内精品国产成人国产三级粉色| 中文字幕在线不卡视频| 欧美日韩在线不卡| 久久香蕉国产线看观看99| 亚洲一区中文在线| 欧美成人三级电影在线| 99久久er热在这里只有精品15 | 老司机精品视频在线| 国产三区在线成人av| 欧美午夜精品一区| 国产精品资源在线观看| 亚洲一区二区三区视频在线播放 | 视频一区二区三区在线| 精品99久久久久久| 欧美色电影在线| 国产99久久久国产精品免费看| 一区二区三区小说| 2024国产精品视频| 精品视频资源站| 不卡免费追剧大全电视剧网站| 日韩精品视频网| 亚洲欧美日韩在线播放| 精品国产91乱码一区二区三区 | 欧美美女网站色| zzijzzij亚洲日本少妇熟睡| 久久国产福利国产秒拍| 亚洲图片欧美综合| 国产精品另类一区| 日韩欧美国产三级电影视频| 欧美婷婷六月丁香综合色| 成人午夜免费电影| 国产真实乱偷精品视频免| 香蕉加勒比综合久久| 伊人色综合久久天天人手人婷| 国产精品人成在线观看免费| 国产日韩欧美高清在线| 51午夜精品国产| 欧美色综合天天久久综合精品| 成人一道本在线| 国产麻豆成人精品| 久久成人久久鬼色| 日本欧美肥老太交大片| 一区二区三区免费| 亚洲美女在线一区| 综合欧美一区二区三区| 国产精品网友自拍| 国产欧美视频一区二区| 久久女同精品一区二区| 久久新电视剧免费观看| 久久久久久综合| 久久久精品影视| 国产性天天综合网| 欧美激情综合在线| 亚洲国产精品ⅴa在线观看| 久久先锋影音av| 国产欧美一区二区三区沐欲| 久久你懂得1024| 国产精品色在线| 亚洲欧美日韩在线播放| 亚洲欧美日本在线| 亚洲愉拍自拍另类高清精品| 亚洲第一激情av| 日本午夜一本久久久综合| 麻豆精品一区二区| 国产在线精品不卡| 国产99久久久国产精品潘金网站| 成人手机电影网| 91在线观看下载| 欧美视频在线观看一区二区| 欧美三级中文字| 精品蜜桃在线看| 欧美极品少妇xxxxⅹ高跟鞋| 中文字幕中文字幕在线一区 | 欧美一区二区三区四区五区| 555www色欧美视频| 久久久美女毛片| ...av二区三区久久精品| 亚洲一区二区三区四区不卡| 免费欧美在线视频| 国产高清不卡一区| 欧美日韩一二三| 国产精品短视频| 亚洲图片有声小说| 久久精品国产99国产| 国产不卡高清在线观看视频| 色综合久久88色综合天天免费| 欧美日韩一区不卡| 久久久久久久久伊人| 亚洲精品视频在线观看网站| 香蕉久久一区二区不卡无毒影院| 伦理电影国产精品| 播五月开心婷婷综合| 欧美卡1卡2卡| 亚洲国产精品高清| 婷婷亚洲久悠悠色悠在线播放| 国产黄人亚洲片| 欧美日韩一区二区在线观看视频| 欧美不卡一区二区| 亚洲激情一二三区| 精品一区二区三区蜜桃| 色av一区二区| 久久精品综合网| 亚洲成人自拍网| 成人激情av网| 欧美电影免费观看高清完整版在线| 中文字幕欧美激情一区| 日本美女一区二区| 91亚洲精品久久久蜜桃| 久久亚洲一区二区三区四区| 洋洋av久久久久久久一区| 国产精品一区二区三区网站| 欧美日韩精品三区| 亚洲视频一区二区在线观看| 激情五月婷婷综合网| 在线亚洲一区二区| 国产精品久久三区| 久久99九九99精品| 91精品黄色片免费大全| 亚洲欧美激情小说另类| 国产成人精品影院| 精品乱人伦一区二区三区| 亚洲不卡一区二区三区| 97久久超碰国产精品| 国产婷婷色一区二区三区| 免费在线观看不卡| 欧美欧美午夜aⅴ在线观看| 亚洲免费观看在线视频| 成人性色生活片| 在线视频亚洲一区| 欧美精选一区二区| 亚洲在线观看免费| 在线观看国产91| 亚洲女性喷水在线观看一区| 国产精品亚洲а∨天堂免在线| 日韩一区二区不卡| 天堂一区二区在线| 欧美精选在线播放| 午夜不卡av在线| 91.com视频| 日本亚洲一区二区| 欧美一区二区免费| 日韩avvvv在线播放| 欧美一卡二卡三卡| 人妖欧美一区二区| 日韩一区二区三区视频| 免费观看一级欧美片| 日韩一区二区三区视频在线观看| 午夜天堂影视香蕉久久| 欧美区在线观看| 奇米色一区二区| 精品噜噜噜噜久久久久久久久试看| 日韩高清在线不卡| 日韩女同互慰一区二区| 久久精品99久久久| 久久嫩草精品久久久精品| 国产精品一区二区三区乱码| 国产精品污网站| 91视频www| 亚洲国产cao| 日韩一级片在线观看| 美女视频网站黄色亚洲| 久久综合精品国产一区二区三区| 国产在线观看免费一区| 国产精品亲子伦对白| 99久久99久久免费精品蜜臀| 亚洲欧美区自拍先锋| 欧美精品在线观看一区二区| 狠狠狠色丁香婷婷综合久久五月| 久久精品夜色噜噜亚洲a∨| 成人中文字幕电影| 亚洲国产日韩一级| 欧美一区二区三区电影| 成人性生交大合| 亚洲国产综合视频在线观看| 日韩美女在线视频| 成人午夜私人影院| 亚洲国产欧美日韩另类综合|