资源简介
2812 DSP的PID控制程序,使用C语言编程
代码片段和文件信息
#include “DSP281x_Device.h“ // DSP281x Headerfile Include File
#include “DSP281x_Examples.h“ // DSP281x Examples Include File
#include “ctr.h“
#include “PID.h“
#include “scancode.h“
// Prototype statements for functions found within this file.
interrupt void cpu_timer0_isr(void);
#define LEDS *(int *)0xc0000
#define port8000 (*((unsigned int *)0x108000))
#define port8001 (*((unsigned int *)0x108001))
#define port8002 (*((unsigned int *)0x108002))
#define port8003 (*((unsigned int *)0x108003))
#define port8004 (*((unsigned int *)0x108004))
#define port8007 (*((unsigned int *)0x108007))
void Gpio_select(void);
void Gpio_PortB(void);
void ShowParameters();
void LCDPutString(unsigned int *pDataint xint yunsigned int nCharNumberunsigned color);
void PIDControl(int rkint yk);
char ConvertScanToChar(unsigned char cScanCode);
Uint16 var1 = 0;
Uint16 var2 = 0;
Uint16 var3 = 0;
Uint16 test_count = 0;
Uint16 Test_flag = 0;
Uint16 Test_var = 0;
Uint16 Test_status[32];
int i=0nnn;
unsigned int nCountnCount1nCount2nCount3nJSSpeeduWorkuN;
unsigned int uLBD;
float a=0.6fb=0.2fc=0.1fduk;
int ekek1ek2tz;
int nInput;
int nSSSpwm;
int mdwc;
unsigned int nScreenBuffer[1024];
void main(void)
{
unsigned int uPort8000;
unsigned int nScanCode;
unsigned char cKey;
int speed[100]splj;
float ljh;
char strInput[4];
int iw1w2w3;
uLBD=nnn=0;
nCount=nCount1=nCount2=nCount3=nJSSpeed=0;
for ( sp=0;sp<100;sp++ ) speed[sp]=0;
sp=nSSS=nCount=nCount1=nCount2=nJSSpeed=0; cKey=0; nInput=tz=wc=0;
ek=ek1=ek2=0;
for ( uWork=0;uWork<4;uWork++ ) strInput[uWork]=0;
uN=100; md=70; pwm=0;
// Step 1. Initialize System Control:
// PLL WatchDog enable Peripheral Clocks
// This example function is found in the DSP281x_SysCtrl.c file.
InitSysCtrl();
// Step 2. Initalize 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
// 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();
// Interrupts that are used in this example are re-mapped to
// ISR functions found within this file.
EALLOW; // This is n
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3605 2005-04-18 18:57 lab0604-PID\cc_build_Debug.log
文件 2084 2004-04-21 14:34 lab0604-PID\CTR.h
文件 837 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_CodeStartBranch.obj
文件 3936 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_CpuTimers.obj
文件 11858 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_DefaultIsr.obj
文件 144817 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_GlobalVariableDefs.obj
文件 4553 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_PieCtrl.obj
文件 13585 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_PieVect.obj
文件 8766 2005-04-18 18:56 lab0604-PID\Debug\DSP281x_SysCtrl.obj
文件 52597 2005-04-18 18:56 lab0604-PID\Debug\PID.obj
文件 21114 2005-04-18 18:57 lab0604-PID\Debug\time.map
文件 41168 2005-04-14 19:34 lab0604-PID\Debug\time.obj
文件 181322 2005-04-18 18:57 lab0604-PID\Debug\time.out
文件 1242 2005-04-18 18:56 lab0604-PID\Debug.lkf
文件 1242 2005-04-18 18:56 lab0604-PID\Debug.lkv
文件 475 2003-09-05 13:44 lab0604-PID\Example_281xCpuTimer.gel
文件 5024 2005-04-18 18:38 lab0604-PID\F2812_EzDSP_RAM_lnk.cmd
文件 6766 2005-04-14 20:37 lab0604-PID\LCD.lib
文件 11817 2005-04-18 18:38 lab0604-PID\PID.c
文件 4436 2005-04-14 20:56 lab0604-PID\PID.h
文件 7840 2005-04-18 18:57 lab0604-PID\PID.paf
文件 1770 2005-04-18 18:39 lab0604-PID\PID.pjt
文件 447 2004-05-09 18:12 lab0604-PID\scancode.h
文件 7651 2004-08-09 11:40 lab0604-PID\speaker.paf
文件 7669 2005-04-14 18:12 lab0604-PID\time.paf
目录 0 2014-06-15 17:42 lab0604-PID\Debug
目录 0 2014-06-15 17:42 lab0604-PID
----------- --------- ---------- ----- ----
546621 27
............此处省略0个文件信息
相关资源
- Proteus仿真:PID算法输出.rar
- 一个模糊PID温度控制算法源代码
- pid控制电机
- PID算法.c
- C语言模糊控制程序
- SpiderMonkey1.61.7 编译文件全部libdllh文件
- 先进PID控制MATLAB仿真
- 模糊PID硕士期刊论文及源码.zip
- ti官方DSP2812例程
- 先进pid控制及其matlab仿真64898
- 网络爬虫 C++ Crawler Spider
- 获取U盘VIDPID盘符物理序列号源码可运
- 顾卫刚手把手教你学DSP基于2812
- DSP2812的C语言例程及开发板相关资料
- PID调节电机转速 配合MPU6050
- 积分分离型PID控制 匿名四轴波形输出
- PID参数整定一本通
- rapid Scada组态软件
- PID学习资料 各种PID解释和应用
- 自适应PID,C语言源码
- dsp2812三相PWM逆变源程序C++
- SuperPid修改进程PID工具驱动级.别名.
- C语言实现PID控制直流电机调速含pro
- DSPF2812双闭环控制电机
- NCDDE服务连接DDE封装的APIddehelper
- 数字PID控制器 Proteus软件仿真
- 模糊PID控制C语言程序.doc
- Project1.rar
- 模糊PID的C语言程序
- 自适应模糊PID代码 C++实现
评论
共有 条评论