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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? example_2833xecap_apwm.c

?? 這是TI公司最新TMS320F28335DSP的常用基礎代碼集6非常有用只要你用該DSP的話.
?? C
字號:
// TI File $Revision: /main/9 $
// Checkin $Date: August 10, 2007   09:04:32 $
//###########################################################################
//
// FILE:    Example_2833xECap_apwm.c
//
// TITLE:   DSP2833x ECAP APWM Example
//
// ASSUMPTIONS:
//
//    This program requires the DSP2833x header files.
//
//    Monitor eCAP1 - eCAP4 pins on a oscilloscope as
//    described below.
//
//       eCAP1 on GPIO24
//       eCAP2 on GPIO7
//       eCAP3 on GPIO9
//       eCAP4 on GPIO11
//
//    As supplied, this project is configured for "boot to SARAM"
//    operation.  The 2833x Boot Mode table is shown below.
//    For information on configuring the boot mode of an eZdsp,
//    please refer to the documentation included with the eZdsp,
//
//       $Boot_Table:
//
//         GPIO87   GPIO86     GPIO85   GPIO84
//          XA15     XA14       XA13     XA12
//           PU       PU         PU       PU
//        ==========================================
//            1        1          1        1    Jump to Flash
//            1        1          1        0    SCI-A boot
//            1        1          0        1    SPI-A boot
//            1        1          0        0    I2C-A boot
//            1        0          1        1    eCAN-A boot
//            1        0          1        0    McBSP-A boot
//            1        0          0        1    Jump to XINTF x16
//            1        0          0        0    Jump to XINTF x32
//            0        1          1        1    Jump to OTP
//            0        1          1        0    Parallel GPIO I/O boot
//            0        1          0        1    Parallel XINTF boot
//            0        1          0        0    Jump to SARAM	    <- "boot to SARAM"
//            0        0          1        1    Branch to check boot mode
//            0        0          1        0    Boot to flash, bypass ADC cal
//            0        0          0        1    Boot to SARAM, bypass ADC cal
//            0        0          0        0    Boot to SCI-A, bypass ADC cal
//                                              Boot_Table_End$
//
// DESCRIPTION:
//
//    This program sets up the eCAP pins in the APWM mode.
//    This program runs at 150 MHz SYSCLKOUT assuming a 30 MHz
//    XCLKIN or 100 MHz SYSCLKOUT assuming a 20 MHz XCLKIN.
//
//    For 150 MHz devices:
//
//    eCAP1 will come out on the GPIO24 pin
//    This pin is configured to vary between 7.5 Hz and 15 Hz using
//    the shadow registers to load the next period/compare values
//
//    eCAP2 will come out on the GPIO7 pin
//    this pin is configured as a 7.5 Hz output
//
//    eCAP3 will come out on the GPIO9 pin
//    this pin is configured as a 1.5 Hz output
//
//
//    eCAP4 will come out on the GPIO11 pin
//    this pin is configured as a 30 kHz output
//
//    All frequencies assume a 30 Mhz input clock. The XCLKOUT pin
//    should show 150Mhz.
//    --------------------------------------------------------------
//    For 100 MHz devices:
//
//    eCAP1 will come out on the GPIO24 pin
//    This pin is configured to vary between 5 Hz and 10 Hz using
//    the shadow registers to load the next period/compare values
//
//    eCAP2 will come out on the GPIO7 pin
//    this pin is configured as a 5 Hz output
//
//    eCAP3 will come out on the GPIO9 pin
//    this pin is configured as a 1 Hz output
//
//    eCAP4 will come out on the GPIO11 pin
//    this pin is configured as a 20kHz output
//
//    All frequencies assume a 20 Mhz input clock. The XCLKOUT pin
//    should show 100Mhz.
//
//
//    Watch Variables:
//
//
//
//###########################################################################
// Original Author: D.F.
//
// $TI Release: DSP2833x Header Files V1.01 $
// $Release Date: September 26, 2007 $
//###########################################################################

#include "DSP2833x_Device.h"     // DSP2833x Headerfile Include File
#include "DSP2833x_Examples.h"   // DSP2833x Examples Include File

// Global variables
Uint16 direction = 0;

void main(void)
{

// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
   InitSysCtrl();

// Step 2. Initalize GPIO:
// This example function is found in the DSP2833x_Gpio.c file and
// illustrates how to set the GPIO to it's default state.
// InitGpio();  // Skipped for this example

// Initialize the GPIO pins for eCAP.
// This function is found in the DSP2833x_ECap.c file
   InitECapGpio();

// 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 DSP2833x_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 DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
   InitPieVectTable();

// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
// No interrupts used for this example.

// Step 4. Initialize all the Device Peripherals:
// This function is found in DSP2833x_InitPeripherals.c
// InitPeripherals(); // Not required for this example

// Step 5. User specific code


   // Setup APWM mode on CAP1, set period and compare registers
   ECap1Regs.ECCTL2.bit.CAP_APWM = 1;	// Enable APWM mode
   ECap1Regs.CAP1 = 0x01312D00;			// Set Period value
   ECap1Regs.CAP2 = 0x00989680;			// Set Compare value
   ECap1Regs.ECCLR.all = 0x0FF;			// Clear pending interrupts
   ECap1Regs.ECEINT.bit.CTR_EQ_CMP = 1; // enable Compare Equal Int

   // Setup APWM mode on CAP2, set period and compare registers
   ECap2Regs.ECCTL2.bit.CAP_APWM = 1;	// Enable APWM mode
   ECap2Regs.CAP1 = 0x01312D00;			// Set Period value
   ECap2Regs.CAP2 = 0x00989680;			// Set Compare value
   ECap2Regs.ECCLR.all = 0x0FF;			// Clear pending interrupts
   ECap1Regs.ECEINT.bit.CTR_EQ_CMP = 1; // enable Compare Equal Int

   // Setup APWM mode on CAP3, set period and compare registers
   ECap3Regs.ECCTL2.bit.CAP_APWM = 1;	// Enable APWM mode
   ECap3Regs.CAP1 = 0x05F5E100;			// Set Period value
   ECap3Regs.CAP2 = 0x02FAF080;			// Set Compare value
   ECap3Regs.ECCLR.all = 0x0FF;			// Clear pending interrupts
   ECap1Regs.ECEINT.bit.CTR_EQ_CMP = 1; // enable Compare Equal Int

   // Setup APWM mode on CAP4, set period and compare registers
   ECap4Regs.ECCTL2.bit.CAP_APWM = 1;	// Enable APWM mode
   ECap4Regs.CAP1 = 0x00001388;			// Set Period value
   ECap4Regs.CAP2 = 0x000009C4;			// Set Compare value
   ECap4Regs.ECCLR.all = 0x0FF;			// Clear pending interrupts
   ECap1Regs.ECEINT.bit.CTR_EQ_CMP = 1; // enable Compare Equal Int

   // Start counters
   ECap1Regs.ECCTL2.bit.TSCTRSTOP = 1;
   ECap2Regs.ECCTL2.bit.TSCTRSTOP = 1;
   ECap3Regs.ECCTL2.bit.TSCTRSTOP = 1;
   ECap4Regs.ECCTL2.bit.TSCTRSTOP = 1;

   for(;;)
   {
      // set next duty cycle to 50%
      ECap1Regs.CAP4 = ECap1Regs.CAP1 >> 1;

      // vary freq between 7.5 Hz and 15 Hz (for 150MHz SYSCLKOUT) 5 Hz and 10 Hz (for 100 MHz SYSCLKOUT)
      if(ECap1Regs.CAP1 >= 0x01312D00)
      {
         direction = 0;
      } else if (ECap1Regs.CAP1 <= 0x00989680)
      {
         direction = 1;
      }

      if(direction == 0)
      {
         ECap1Regs.CAP3 = ECap1Regs.CAP1 - 500000;
      } else
      {
         ECap1Regs.CAP3 = ECap1Regs.CAP1 + 500000;
      }
   }

}



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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区精品性| 欧美男女性生活在线直播观看| 2021久久国产精品不只是精品| 蜜臀av一区二区在线观看| 日韩欧美成人午夜| 国产一区二区三区综合| 国产欧美精品一区二区三区四区| 99亚偷拍自图区亚洲| 亚洲专区一二三| 91精品国产福利在线观看 | 制服丝袜亚洲播放| 美国欧美日韩国产在线播放| 精品播放一区二区| 99久久综合99久久综合网站| 亚洲一区二区精品久久av| 555夜色666亚洲国产免| 久久99九九99精品| 亚洲私人影院在线观看| 91精品国产欧美一区二区成人 | 欧美性一区二区| 蜜芽一区二区三区| 中文字幕免费一区| 精品视频全国免费看| 久久国产人妖系列| 国产精品久久久久久久久晋中 | 国产在线视频精品一区| 亚洲欧洲精品一区二区精品久久久| 99热精品一区二区| 奇米一区二区三区| 日韩毛片精品高清免费| 91精品国产一区二区三区蜜臀| 国产一区二区三区| 一区二区三区在线看| 欧美videossexotv100| 97久久精品人人爽人人爽蜜臀| 轻轻草成人在线| 亚洲欧洲综合另类| 久久香蕉国产线看观看99| 欧美亚洲国产一区二区三区va| 激情综合网天天干| 亚洲一二三四区不卡| 欧美激情在线一区二区| 9191久久久久久久久久久| jizz一区二区| 国产永久精品大片wwwapp| 亚洲成人自拍一区| 亚洲天堂2016| 久久精品夜色噜噜亚洲a∨| 欧美精品tushy高清| 91亚洲精品久久久蜜桃| 韩国精品在线观看| 三级欧美在线一区| 亚洲美女视频一区| 国产精品麻豆一区二区| 日韩精品一区二区三区在线播放 | 91九色02白丝porn| 成人av网在线| 国产成人日日夜夜| 免费观看91视频大全| 亚洲永久免费视频| 日韩理论电影院| 国产精品色婷婷| 久久久久久久久久电影| 精品免费日韩av| 777亚洲妇女| 欧洲一区二区三区免费视频| 99久久精品免费看| 99精品久久只有精品| 成人不卡免费av| 国产精品一级黄| 国产麻豆精品theporn| 久久99最新地址| 日本免费在线视频不卡一不卡二| 亚洲综合激情另类小说区| 亚洲色图视频网站| 亚洲三级在线观看| 亚洲欧美在线aaa| 亚洲女与黑人做爰| 一区二区三区在线观看欧美| 亚洲精品乱码久久久久久久久| 成人免费一区二区三区在线观看| 欧美国产精品v| 中文字幕在线免费不卡| 亚洲人成小说网站色在线| 亚洲精品中文在线| 亚洲国产精品久久一线不卡| 亚洲www啪成人一区二区麻豆| 亚洲电影视频在线| 亚洲成人在线观看视频| 日韩福利电影在线观看| 麻豆精品国产传媒mv男同| 国产一二三精品| 成人综合在线观看| 91免费国产视频网站| 欧美中文字幕一区二区三区| 欧美精品久久一区| 337p日本欧洲亚洲大胆精品| 国产免费久久精品| 亚洲视频一二三区| 爽爽淫人综合网网站| 久久99国产精品麻豆| 风间由美一区二区三区在线观看| 99国产精品久久| 欧美日韩专区在线| 精品国产sm最大网站| 国产精品嫩草99a| 一区二区免费看| 秋霞电影一区二区| 波多野结衣视频一区| 欧美性猛交xxxxxx富婆| 欧美变态口味重另类| 国产精品国产三级国产aⅴ入口| 樱花影视一区二区| 国内成人免费视频| 一本色道**综合亚洲精品蜜桃冫 | 日韩欧美电影一区| 欧美国产禁国产网站cc| 亚洲不卡一区二区三区| 国产不卡视频在线播放| 欧美视频日韩视频在线观看| 久久综合色综合88| 亚洲一区二区黄色| 国产成人精品亚洲777人妖| 欧美性大战xxxxx久久久| 久久综合九色综合久久久精品综合| 亚洲天堂福利av| 国内成人自拍视频| 欧美精品粉嫩高潮一区二区| 中文文精品字幕一区二区| 日韩精品高清不卡| 99在线视频精品| 欧美不卡在线视频| 亚洲成人精品一区二区| 国产69精品久久777的优势| 在线不卡中文字幕播放| 国产精品传媒入口麻豆| 国产主播一区二区| 91精品国产手机| **欧美大码日韩| 黄色资源网久久资源365| 欧美日韩国产欧美日美国产精品| 久久久精品天堂| 免费高清视频精品| 欧美乱妇一区二区三区不卡视频| 亚洲欧洲中文日韩久久av乱码| 国产高清在线精品| 日韩欧美综合一区| 丝袜美腿高跟呻吟高潮一区| 色综合久久中文字幕| 国产免费观看久久| 国产精品自在在线| 久久一区二区三区四区| 日产国产欧美视频一区精品| 欧美系列一区二区| 依依成人精品视频| 99精品国产一区二区三区不卡| 国产婷婷色一区二区三区在线| 激情六月婷婷综合| 精品美女一区二区| 美女任你摸久久| 欧美一区三区二区| 午夜精品aaa| 欧美日韩成人激情| 日韩电影免费一区| 欧美一区二区免费观在线| 天堂在线亚洲视频| 欧美人动与zoxxxx乱| 亚洲成a人在线观看| 欧美亚洲一区二区在线观看| 亚洲国产欧美在线| 欧美日韩一区二区电影| 亚洲成人av福利| 欧美日本在线看| 亚洲国产aⅴ天堂久久| 欧美精品自拍偷拍动漫精品| 日韩国产欧美三级| 欧美成人官网二区| 国产黄人亚洲片| 国产精品美女久久久久久久| jiyouzz国产精品久久| 亚洲精品久久7777| 欧美日韩免费高清一区色橹橹| 午夜一区二区三区视频| 日韩视频免费直播| 国产一区二区伦理| 亚洲婷婷综合色高清在线| 欧美在线免费视屏| 六月丁香婷婷久久| 久久久不卡网国产精品二区| 成人18视频在线播放| 亚洲欧美电影院| 欧美一区二区三区人| 国产成人小视频| 亚洲色图视频免费播放| 在线不卡免费欧美| 国产精品99久久久久久宅男| 亚洲视频综合在线| 日韩欧美在线1卡| 懂色av一区二区三区免费看| 一区二区在线观看免费视频播放|