dsp呼吸灯C语⾔编程,DSP28335呼吸灯程序DSP28335呼吸灯程序
//>>>>>>>>>>>>>>>
//
// FILE: Example_2833xFlash.c
//编程语言下载
// TITLE: DSP2833x ePWM Timer Interrupt From Flash Example.
//
// ASSUMPTIONS:
//
// This program requires the DSP2833x header files.
//
/
/ As supplied, this project is configured for "boot to FLASH"
// 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
// 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$
//
//>>>>>>>>>>>>>>> // $TI Release: DSP2833x Header Files V1.01 $
// $Release Date: June 24, 2016 $
//>>>>>>>>>>>>>>> #include "DSP2833x_Device.h" // DSP2833x Headerfile Include File
#include "DSP2833x_Examples.h" // DSP2833x Examples Include File
// Configure which ePWM timer interrupts are enabled at the PIE level:
// 1 = enabled, 0 = disabled
#define PWM1_INT_ENABLE 1
// Configure the period for each timer
#define PWM1_TIMER_TBPRD 50000
// Prototype statements for functions found within this file.
interrupt void epwm1_timer_isr(void);
void InitEPwmTimer(void);
void PwmControl(void);
void update_compare(void);
Uint16 CmpA = 0;//占空⽐A
Uint16 CmpB = 0;//占空⽐B
Uint16 Timecount=0;
void main(void)
{
// Uint16 i = 0x55;
// Ste
p 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。

发表评论