软件开发M0plus架构资料Cortex™ -M0
- 软件开发基于ARM Cortex-M3 函数信号发生器
- 涉及便件连接情况: PA0~7--------DDS模块 D0~D7
- PB4 PB5 PB6----DDS模块fqud reset w_clk
- PB0 PB2 PB3----液晶12864 CS(RS) DIO(RW) CLK(EP)
- PE0 PE1 PE2 ----KEY3 KEY4 KEY5
- PD1 PG5------KEY1 KEY2
- PD0 PG2------LED1 LED2
- PF0 PF1-----接24C04 SDA SCL
- 程序主要功能:
- 软件开发
- *********************************************************/
- #include <includes.h>
- #include "AD9850.h"
- #include "24C04.h"
- #define SysCtlPeriEnable SysCtlPeripheralEnable
- #define SysCtlPeriDisable SysCtlPeripheralDisable
- #define GPIOPinTypeOut GPIOPinTypeGPIOOutput
- #define TASK_STK_SIZE 64
- /**************************************
- CONSTANTS 常量
- **************************************/
- /************************************
- VARIABLES 变量
- *************************************/
- uint16 now_color=0; //当前色
- uint16 state=0,flag=0; //状态
- uint16 frist_in=0; //初次进入标志
- unsigned long num,aa=1,temp=0;
- unsigned long ulData = 0;
- unsigned char buff[5];
- unsigned char display[10];
- unsigned char fshi1=0,fge1=0,temp1=0;
- unsigned char fshi2=0,fge2=0,temp2=0;
- unsigned char fshi3=0,fge3=0,temp3=0;
- unsigned long dat=0,dat2,dat3;
- unsigned char wan=0, qian=0,ge=0,shi=0,bai=0;
- unsigned char wan2, qian2,ge2,shi2,bai2;
- unsigned char wan3, qian3,ge3,shi3,bai3;
- unsigned char ge4,shi4;
- static OS_STK GstkStart[TASK_START_STK_SIZE];//启动任务的堆栈
- static OS_STK GstkLED[TASK_LED_STK_SIZE];
- OS_STK Task1Stk[TASK_STK_SIZE];
- OS_STK Task2Stk[TASK_STK_SIZE];
上一篇:斩波调压电路+程序软件开发

芯片解密