资源简介
F28335+CPLD
代码片段和文件信息
/*-----------------------包含头文件-----------------------------*/
//#define extern
#include “DSP28x_Project.h“
#include “function.h“
#include “ADS8588.h“
#include “DSP2833x_I2c_defines.h“
//#include “Common.h“
//#include “stdlib.h“
//#include “IQmathLib.h“
/*-----------------------参数定义-----------------------------*/
#define DELAY 1000000L
#define Channel_AD2_Port 0x180001 // (0x2061)
#define Channel_AD1_Port 0x180000 // (0x2061)
/*-----------------------变量声明-----------------------------*/
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsRunStart;
extern Uint16 RamfuncsLoadSize;
Uint16 *recb;
Uint16 sys_state = 0;
int16 TEST[16];
unsigned int fault_flag;
unsigned int Int_Switch_Flag;
char ReceivedChar;
Uint16 duty = 500;
int16 *msg;
int i=0;
int16 l_temp = 0;
Uint32 *ADREAD = (Uint32*)0x180001;
struct I2CMSG I2cMsgIn1;
Uint16 time[7];
struct TIME Stime;
struct TIME Ntime;
Uint16 tempw[100];
Uint16 tempr[100];
//extern char RecCharb[16];
char recbyebrecbyectestbye;
char SendCharb[16];
char para[100][16]state[100][8]command[20][8];
Uint8 value;
// extern Uint8 count;
Uint8 oldcount=0;
Uint8 newcount=0;
Uint8 flag=0;
Uint8 len=0;
Uint8 Intcount=0;
Uint8 scibflag=0;
/*-----------------------函数声明-----------------------------*/
//SCIB-485
//__interrupt void epwm1_isr(void);
__interrupt void xint1_isr(void);
__interrupt void tzint_isr(void);
__interrupt void epwm1_isr(void);
void main(void)
{
char SendCharc[16];
char RecCharc[16];
char readdin1;
char readdin2;
char readdin3;
char readdin4;
Uint16 testspi;
Uint16 temp;
char i;
Stime.Second=0x00;
Stime.Minute=0x00;
Stime.Hour=0x00;
Stime.Day=0x01;
Stime.Date=0x06;
Stime.Month=0x03;
Stime.Year=0x17;
InitSysCtrl();//系统初始化
memcpy(&RamfuncsRunStart &RamfuncsLoadStart (Uint32)&RamfuncsLoadSize);//程序从flash搬到ram
InitFlash();
DINT;
InitPieCtrl();
IER = 0x0000;
IFR = 0x0000;
InitPieVectTable();
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.EPWM1_INT = &epwm1_isr;//pwm中断
PieVectTable.XINT1 = &xint1_isr;//AD转换完成中断
PieVectTable.EPWM1_TZINT = &tzint_isr;//TZ 中断
EDIS; // This is needed to disable write to EALLOW protected registers
Initial();
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;// Enable the PIE block
PieCtrlRegs.PIEIER3.bit.INTx1 = 1;//
PieCtrlRegs.PIEIER1.bit.INTx4 = 1;//
PieCtrlRegs.PIEIER2.bit.INTx1 = 1;//
IER |= M_INT1; // Enable CPU int1
IER |= M_INT2; // Enable CPU int1
IER |= M_INT3; // Enable CPU int3
// Enable global Interrupts and higher priority real-time debug events:
EINT; // Enable Global interrupt INTM
ERTM; // Enable Global realtime interrupt DBGM
/* AD_RST_HIGH;
DELAY_US(1);
AD_RST_HIGH;
DELAY_US(10);*/
Set_Time(&Stime);
- 上一篇:PV操作的实现源代码+报告
- 下一篇:AE真正的合成复制脚本教程
相关资源
- 一种高压防爆SVG用水冷却装置的设计
- 如何在CANVAS中使用D3.JS
- 全国各省市svg地图
- 各省市SVG地图
- 800个精美的免费SVG图标
- 广东省各市区无街道地图SVG可接入程
- SVGView.exe
- @face-font 嵌入中文字体和ttf转换eot w
- 字体转换工具:TTF 转 EOT、WOFF、SVG
-
SVGKit.fr
amework - Svg控制策略
- SVG开发实践 源代码
- svg缩略图补丁.zip
- SVG_APF_28335源代码,正常编译
- IrfanView插件 CADImage 已注册无水印授权
- SVG2Vector离线编辑和预览工具
- 火力发电厂含有SVG无功补偿装置的并
- svgdeveloper破解版
- 163枚Firemonkey矢量图标纯原生,非SVG或
- SVG画图工具,整套源码
- svg开发实践PDF电子书
- FMX实用DEMO(Rev.2018013101).rar
- 论文研究-视觉无损的SVG空间矢量数据
- 微信推文svg样板 取消系统加设置的积
- inkscape 地质地层矢量填充符号 patter
- 珠海SVG行政区划图
-
mxgraph svg2xm
l - winfrom 显示指定svg
- SVG 仿真模型
- 基于SVG的SCADA图模库一体化系统的研究
评论
共有 条评论