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

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

?? example_281xadcseq_ovdtest.c

?? dsp ccs3.3 lcd keybord 適合初學(xué)
?? C
字號:
//###########################################################################
//
// FILE:   Example_281xAdcSeq_ovdTest.c
//
// TITLE:  DSP281x ADC Seq Override mode Test.
//
// ASSUMPTIONS:
//
//          This program requires the DSP281x V1.00 header files.  
//          As supplied, this project is configured for "boot to H0" operation.  
// 
//          Make sure the CPU clock speed is properly defined in 
//          DSP281x_Examples.h before compiling this example.
//
//          Connect the signal to be converted to Channel A0.
//
// DESCRIPTION:    
//
//          Channel A0 is converted forever and logged in a buffer (SampleTable)
//          Using sequencer1 in sequencer override mode. Sequencer is Sequential mode
//          with sample rate of 1/(3*40ns) =8.3MHz
//
//          Open a memory window to SampletTable to observe the buffer
//          RUN for a while and stop and see the table contents.
//
//          Watch Variables:
//             SampleTable - Log of converted values.
//             XF          - Toggles on every ADC sequencer flag
//
//###########################################################################
//
// Original source by: S.S.
//
//  Ver | dd mmm yyyy | Who  | Description of changes
// =====|=============|======|===============================================
//  1.00| 11 Sep 2003 | L.H. | Updated for DSP281x Release - First Release
//###########################################################################

#include "DSP281x_Device.h"     // DSP281x Headerfile Include File
#include "DSP281x_Examples.h"   // DSP281x Examples Include File
  
// Determine when the shift to right justify the data takes place
// Only one of these should be defined as 1.  
// The other two should be defined as 0.
#define POST_SHIFT   0  // Shift results after the entire sample table is full
#define INLINE_SHIFT 1  // Shift results as the data is taken from the results regsiter
#define NO_SHIFT     0  // Do not shift the results 
  
// ADC start parameters
#define ADC_MODCLK 0x3   // HSPCLK = SYSCLKOUT/2*ADC_MODCLK2 = 150/(2*3)     = 25MHz
#define ADC_CKPS   0x0   // ADC module clock = HSPCLK/1      = 25MHz/(1)     = 25MHz
#define ADC_SHCLK  0x1   // S/H width in ADC module periods                  = 2 ADC cycle
#define AVG        1000  // Average sample limit
#define ZOFFSET    0x00  // Average Zero offset
#define BUF_SIZE   1024  // Sample buffer size

// Global variable for this example
Uint16 SampleTable[BUF_SIZE];


main() 
{
   Uint16 i;
   Uint16 array_index;                     


// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP281x_SysCtrl.c file.
   InitSysCtrl();
      
// Specific clock setting for this example:      
   EALLOW;
   SysCtrlRegs.HISPCP.all = ADC_MODCLK;	// HSPCLK = SYSCLKOUT/ADC_MODCLK
   EDIS;

// Step 2. Initialize GPIO: 
// This example function is found in the DSP281x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
// InitGpio();  // Skipped for this example  
// Enable the pins as XF pin as output
   EALLOW;
   GpioMuxRegs.GPFMUX.bit.XF_GPIOF14 = 1;  //enable XF pin on GPOF14
   EDIS;

// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts 
   DINT;

// Initialize the PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.  
// This function is found in the DSP281x_PieCtrl.c file.
   InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
   IER = 0x0000;
   IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt 
// Service Routines (ISR).  
// This will populate the entire table, even if the interrupt
// is not used in this example.  This is useful for debug purposes.
// The shell ISR routines are found in DSP281x_DefaultIsr.c.
// This function is found in DSP281x_PieVect.c.
   InitPieVectTable();

// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP281x_InitPeripherals.c
// InitPeripherals(); // Not required for this example
   InitAdc();         // For this example, init the ADC

// Specific ADC setup for this example:
   AdcRegs.ADCTRL1.bit.ACQ_PS = ADC_SHCLK;  // Sequential mode: Sample rate   = 1/[(2+ACQ_PS)*ADC clock in ns]
					    //                     = 1/(3*40ns) =8.3MHz
					    // If Simultaneous mode enabled: Sample rate = 1/[(3+ACQ_PS)*ADC clock in ns]
   AdcRegs.ADCTRL3.bit.ADCCLKPS = ADC_CKPS;     
   AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;        // 1  Cascaded mode
   AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x0;
   AdcRegs.ADCTRL1.bit.CONT_RUN = 1;       // Setup continuous run

   AdcRegs.ADCTRL1.bit.SEQ_OVRD = 1;       // Enable Sequencer override feature
   AdcRegs.ADCCHSELSEQ1.all = 0x0;         // Initialize all ADC channel selects to A0
   AdcRegs.ADCCHSELSEQ2.all = 0x0;
   AdcRegs.ADCCHSELSEQ3.all = 0x0;
   AdcRegs.ADCCHSELSEQ4.all = 0x0;
   AdcRegs.ADCMAXCONV.bit.MAX_CONV1 = 0x7;  // convert and store in 8 results registers 


// Step 5. User specific code, enable interrupts:


// Clear SampleTable
   for (i=0; i<BUF_SIZE; i++)
   {
     SampleTable[i] = 0;
   }

// Start SEQ1
   AdcRegs.ADCTRL2.all = 0x2000;
  
   while(1)
   {  // Take ADC data and log them in SampleTable array
     
     // Initalize the array index.  This points to the current
     // location within the SampleTable
     array_index = 0;
     
     for (i=0; i<(BUF_SIZE/16); i++)
     {
       // Wait for INT1
       while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}
       asm(" setc XF ");                 // Set XF for monitoring  -optional

       AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;

#if INLINE_SHIFT
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7)>>4);
       
#endif //-- INLINE_SHIFT
     
#if NO_SHIFT || POST_SHIFT

       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT0));
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT1));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT2));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT3));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT4));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT5));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT6));                            
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT7));                            
            
#endif //-- NO_SHIFT || POST_SHIFT

       while (AdcRegs.ADCST.bit.INT_SEQ1== 0){}
 	   asm(" clrc XF ");            // Clear XF for monitoring  -optional
       AdcRegs.ADCST.bit.INT_SEQ1_CLR = 1;	

#if INLINE_SHIFT

       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8)>>4);
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14)>>4);              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15)>>4);	              
                                      
#endif //-- INLINE_SHIFT              
                                      
#if NO_SHIFT || POST_SHIFT            
                                      
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT8));
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT9));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT10));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT11));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT12));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT13));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT14));              
       SampleTable[array_index++]= ( (AdcRegs.ADCRESULT15));              
#endif // -- NO_SHIFT || POST_SHIFT 

	}
	

#if POST_SHIFT
    // For post shifting, shift the ADC results 
    // in the SampleTable buffer after the buffer is full.
    for (i=0; i<BUF_SIZE; i++)
    {
      SampleTable[i] = ((SampleTable[i]) >>4);
    }
#endif // -- POST_SHIFT    
    
    asm(" clrc XF ");
  }
}

//===========================================================================
// No more.
//===========================================================================

  

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕人成不卡一区| 欧美一级搡bbbb搡bbbb| 国产精品网曝门| 成人免费视频app| 亚洲精品成a人| 欧美日韩黄视频| 美女视频黄 久久| 日韩免费观看高清完整版| 久久99在线观看| 日本一区二区三区四区在线视频| 成人免费三级在线| 亚洲线精品一区二区三区八戒| 欧美猛男gaygay网站| 免费看黄色91| 国产精品久线在线观看| 91久久精品一区二区三| 日韩专区一卡二卡| 国产亚洲欧美一级| 在线精品国精品国产尤物884a| 日韩专区欧美专区| 国产欧美日韩精品在线| 色狠狠色噜噜噜综合网| 理论片日本一区| 亚洲欧美日韩成人高清在线一区| 欧美日韩aaaaa| 粉嫩av亚洲一区二区图片| 亚洲综合成人网| 精品99一区二区| 在线免费视频一区二区| 国产中文字幕精品| 亚洲激情av在线| 久久亚洲影视婷婷| 欧美亚洲国产一区在线观看网站| 极品美女销魂一区二区三区免费| 中文字幕中文字幕一区| 日韩视频不卡中文| 在线观看av一区二区| 精品午夜久久福利影院| 亚洲综合成人在线| 亚洲国产岛国毛片在线| 欧美日韩精品一区二区三区蜜桃| 国产成人精品aa毛片| 日韩精品国产精品| 国产精品短视频| 精品理论电影在线观看| 欧美性色aⅴ视频一区日韩精品| 国产一区二区三区精品欧美日韩一区二区三区| 亚洲精品菠萝久久久久久久| 国产日韩欧美综合一区| 日韩欧美一区二区免费| 欧美在线免费观看亚洲| 成人av动漫在线| 国产一区三区三区| 日本不卡一区二区| 午夜av电影一区| 亚洲理论在线观看| 国产精品成人免费| 欧美激情一区在线| 国产日韩欧美激情| 久久久久亚洲综合| 精品噜噜噜噜久久久久久久久试看 | 国产精品久久久久久久久晋中| 日韩一区二区电影在线| 3atv一区二区三区| 欧美日韩不卡一区| 欧美三级中文字幕在线观看| 99re在线视频这里只有精品| 国产成人一区二区精品非洲| 国产专区欧美精品| 国产美女在线精品| 国产精品一区二区x88av| 老司机精品视频在线| 另类专区欧美蜜桃臀第一页| 免费高清视频精品| 久久99蜜桃精品| 狠狠色丁香婷婷综合| 国产在线不卡一区| 国产福利一区在线| 成人免费毛片app| 91在线一区二区| 91行情网站电视在线观看高清版| 日本韩国一区二区| 欧美亚一区二区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91色在线porny| 91黄色激情网站| 欧美军同video69gay| 日韩欧美一区中文| 久久一区二区三区四区| 中文字幕av一区二区三区高| 国产精品久久久久久亚洲毛片 | av不卡在线播放| 在线亚洲一区二区| 欧美日韩精品免费观看视频| 欧美一区二区三区四区五区| 精品欧美乱码久久久久久1区2区 | 欧美日韩1234| 337p日本欧洲亚洲大胆色噜噜| 久久先锋资源网| 国产精品福利一区| 午夜日韩在线观看| 国产精品乡下勾搭老头1| 99久久免费精品高清特色大片| 91在线视频官网| 91精品国产入口| 国产性色一区二区| 亚洲免费在线观看| 视频一区欧美精品| 国产一区二区在线观看视频| 99久久er热在这里只有精品15| 欧美性大战久久| 欧美r级电影在线观看| 17c精品麻豆一区二区免费| 午夜欧美2019年伦理| 国产精品99久久久久久有的能看 | 欧美日韩国产高清一区二区| 日韩欧美色综合网站| 一区二区中文字幕在线| 强制捆绑调教一区二区| 成人免费高清在线观看| 欧美一区二区三区系列电影| 亚洲欧美中日韩| 久久精品国产77777蜜臀| 91网站在线观看视频| 欧美第一区第二区| 亚洲欧美二区三区| 国产真实乱子伦精品视频| 色吧成人激情小说| 久久蜜臀精品av| 人人狠狠综合久久亚洲| 99re亚洲国产精品| 久久―日本道色综合久久| 丝袜美腿亚洲一区| 不卡的av在线| 久久亚洲一区二区三区明星换脸 | 综合色天天鬼久久鬼色| 精品一二三四区| 7777精品伊人久久久大香线蕉的| 国产精品国产三级国产三级人妇 | 热久久免费视频| 欧美中文字幕久久| 一色桃子久久精品亚洲| 国产一区二区视频在线| 欧美一区二区日韩| 午夜视频一区二区三区| 在线看日本不卡| 18欧美乱大交hd1984| 丰满放荡岳乱妇91ww| 日韩美女在线视频| 日本欧美在线看| 欧美乱妇15p| 午夜精品久久久久| 欧美亚洲自拍偷拍| 亚洲午夜一区二区| 欧美私模裸体表演在线观看| 国产精品美女久久久久久久| 国产精品一级在线| 26uuu国产电影一区二区| 亚洲成人你懂的| 欧美性色黄大片| 亚洲成av人影院在线观看网| 91麻豆国产自产在线观看| 国产精品午夜免费| 91色乱码一区二区三区| 亚洲精品日产精品乱码不卡| 91视频观看免费| 亚洲激情图片小说视频| 欧美三区在线观看| 五月激情丁香一区二区三区| 欧美精品丝袜中出| 日韩成人伦理电影在线观看| 欧美日韩一本到| 麻豆精品久久久| 久久久久久免费毛片精品| 高清不卡一区二区| √…a在线天堂一区| 色综合网站在线| 亚洲高清在线精品| 欧美成人欧美edvon| 99精品在线免费| 悠悠色在线精品| 欧美天堂一区二区三区| 奇米影视7777精品一区二区| 日韩欧美www| 成人中文字幕在线| 亚洲三级在线播放| 欧美影院一区二区三区| 日韩精品欧美精品| 久久久久国产精品人| 成人av在线一区二区| 亚洲国产精品久久人人爱蜜臀| 91精品国产欧美一区二区成人| 国内精品在线播放| 亚洲乱码一区二区三区在线观看| 欧美日韩国产美| 国产精品白丝jk黑袜喷水| 一区二区三区电影在线播| 日韩一卡二卡三卡四卡| 成人免费观看男女羞羞视频| 亚洲国产日日夜夜|