用PROUTES对LED进行仿真,第一次发帖 不太会
MagicCube编程文档
MagicCube Program Document
#创建程序
创建框架
Source
apps.c
comAssistant.c
main.c
public.c
stc12cIntProcess.c
stc12func.c
Include
apps.h
comAssistant.h
comdef.h
config.h
public.h
stc12func.h
Doc
readme.txt
创建者:王豪
时间:2014.06.25
#根据单片机修改相关程序
修改stc12func.c
修改public.c
修改者:王豪
时间:2014.06.26
#关于138
由于138线焊接反了
138_A = P12
138_B = P11
138_C = P10
所以行选要注意
修改者:王豪
时间:2014.06.27
#将138去掉
直接使用单片机IO
修改者:王豪
时间:2014.06.28
#基本实现功能
可以显示指定的LED
修改者:王豪
时间:2014.06.28
#特效显示效果设计
设计多种显示特效
display.h
display**.c
修改者:王豪
时间:2014.06.29
单片机源代码如下:
- /**
- *******************************************************************************
- * @file main.c
- * @author Whao
- * @version 1.0.0
- * @date 2014/06/25
- * @brief Main function and init function
- *******************************************************************************
- * @attention
- * @addtogroup
- * @COPYRIGHT Whao-Technology
- *******************************************************************************
- */
- /* Includes -------------------------------------------------------------------*/
- #include "public.h"
- #include "stc12func.h"
- #include "apps.h"
- #include "comAssistant.h"
- /* Private typedef -------------------------------------------------------------*/
- /* Private define --------------------------------------------------------------*/
- /* Private macro ---------------------------------------------------------------*/
- /* Private variables -----------------------------------------------------------*/
- /* Private const ---------------------------------------------------------------*/
- /* Private function prototypes -------------------------------------------------*/
- /* Private functions -----------------------------------------------------------*/
- /********************************************************************************/
- /* Ordinary function */
- /********************************************************************************/
- /**
- * @brief This function handles System inital.
- * @param None
- * @retval None
- * @author WHao
- * @data 2013/07/07
- */
- void SystemInit(void)
- {
- InitSTCMcu(); //init stc mcu
- InitCoeff(); //init coefficient
- InitDevice(); //init devices
- TR0 = 1; //start timer0
- TR1 = 1; //start timer1
- EA = 1; //Enable interrupt
- //Send data to pc(or other device)
- UartSend("Rest is Ok\r\n",13);
- }
- /**
- * @brief This function handles main function.
- * @param None
- * @retval None
- * @author WHao
- * @data 2013/08/15
- */
- void main(void)
- {
- SystemInit();
-
- while(TRUE)
- {
- WDTClean(); //Clean WDT
- ……………………
- …………限于本文篇幅 余下代码请从51黑下载附件…………
复制代码
所有资料51hei提供下载:
光立方.rar
(275.37 KB, 下载次数: 7)
|