• 大小: 2MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-12
  • 语言: 其他
  • 标签: 学习,兴  

资源简介

本次课程设计的主要任务是设计一个时钟计数器,也就是要做一个马表,能够计数,并且按照我们平时的时间计数格式显示。 用户界面即为显示界面,大体分三个部分: (1)LCD显示“钟面”样式,时针、分针、秒针显示实时时间 (2)LCD显示“数字钟”样式,动态显示年、月、日、时、分、秒 (3)显示时间可以修改并保持“钟面”与“数字钟”时间保持一致;

资源截图

代码片段和文件信息

/*
;************************************************************************************************************
;*   北京精仪达盛科技有限责任公司
;*                                          研    发    部
;*
;*                                      http://www.techshine.com
;*
;*--------------------------------------------- 文件信息 ----------------------------------------------------                                      
;*
;* 文件名称 : MAIN.c
;* 文件功能 : 所有应用程序的头文件均加在此文件中
;* 补充说明 : 
;*-------------------------------------------- 最新版本信息 -------------------------------------------------
;* 修改作者 : ARM7开发小组
;* 修改日期 : 2004/04/25
;* 版本声明 : V1.0.1
;*-------------------------------------------- 历史版本信息 -------------------------------------------------
;* 文件作者 : ARM7开发小组
;* 创建日期 : 2004/04/20
;* 版本声明 : v1.0.0
;*-----------------------------------------------------------------------------------------------------------
;*-----------------------------------------------------------------------------------------------------------
;************************************************************************************************************
;*/
//#include “..\..\Gui\Init\GUI_Init.h“
#include “..\gui\glib\glib.h“
#include “..\lcddrv\inc\lcd.h“
#include “..\..\lcddrv\inc\lcdlib.h“
#include “target.h“
#include “2410LIB.h“
#include “2410addr.h“
#include “math.h“
#include “stdio.h“

extern GUI_FONT GUI_Font8x16;
extern GUI_FONT CHINESE_FONT12;
extern GUI_FONT CHINESE_FONT16;

/*
*************************************************************************************************************
- 函数名称 : Main(void)
- 函数说明 : 系统的主程序入口
- 输入参数 : 无
- 输出参数 : 无
*************************************************************************************************************
*/
#define MINUTE_R 100
#define SECOND_R 150
#define HOUR_R 50
#define SCALE 210
int Degree(short degree)
{
if(degree < 0)
{
return 360 + degree;
}
return degree;
}

void Main(void){
    int Count = 3000;
    int hour_tempminute_tempsecond_temp;
int minute_x1minute_y1;
int second_x3second_y3;
int hour_x2hour_y2;
int scale_xscale_y;
char str[10]={0}; 
int degree_temp = 0;
float val_temp = 0.5;
  Target_Init();
  GUI_Init();
   Set_Color(GUI_RED);
   Draw_Circle(350250200);  
   Draw_Circle(350250201);
   Draw_Circle(350250202);
   Draw_Circle(3805040);  
   Draw_Circle(3205040);
Fill_Circle (3805038);  
   Fill_Circle (3205038);

   Delay(Count);
   minute_x1   =   350   +   MINUTE_R   *   cos(Degree(-90)   *   3.14   /180   ); 
minute_y1   =   250   +   MINUTE_R   *   sin(Degree(-90)   *   3.14   /180   );
second_x3   =   350   +   SECOND_R   *   cos(Degree(-90)   *   3.14   /180   ); 
second_y3   =   250   +   SECOND_R   *   sin(Degree(-90)   *   3.14   /180   );
hour_x2   =   350   +   HOUR_R   *   cos(Degree(-90)   *   3.14   /180   ); 
hour_y2   =   250   +   HOUR_R   *   sin(Degree(-90)   *   3.14   /180   );

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-01-09 20:28  计时器课设\
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Application\
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Application\SRC\
     文件        7661  2018-12-27 10:24  计时器课设\test12 - 副本\Application\SRC\MAIN.c
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Gui\
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Gui\Font\
     文件       26136  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Font\Font8x16.c
     文件        1749  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Font\Font_Cn12.c
     文件        1749  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Font\Font_Cn14.c
     文件        1745  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Font\Font_Cn16.c
     文件       12744  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Font\Gchar.c
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Gui\Glib\
     文件       17974  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Glib\Glib.c
     文件       15092  2017-10-31 23:07  计时器课设\test12 - 副本\Gui\Glib\Glib.h
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\Gui\Init\
     文件        1697  2017-10-31 23:06  计时器课设\test12 - 副本\Gui\Init\data.h
     文件        1446  2017-10-31 23:06  计时器课设\test12 - 副本\Gui\Init\GUI_Init.c
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\HZK\
     文件      262144  2017-10-31 22:51  计时器课设\test12 - 副本\HZK\HZK12.BIN
     文件      228984  2017-10-31 22:51  计时器课设\test12 - 副本\HZK\HZK14.BIN
     文件      267616  2017-10-31 22:51  计时器课设\test12 - 副本\HZK\HZK16.BIN
     文件      190996  2018-12-27 10:25  计时器课设\test12 - 副本\LCD.mcp
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\LCDDRV\
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\LCDDRV\INC\
     文件         239  2017-10-31 23:06  计时器课设\test12 - 副本\LCDDRV\INC\lcd.h
     文件        1648  2017-10-31 23:06  计时器课设\test12 - 副本\LCDDRV\INC\lcdlib.h
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\LCDDRV\SRC\
     文件        1221  2017-10-31 23:06  计时器课设\test12 - 副本\LCDDRV\SRC\lcd.c
     文件        2578  2017-10-31 23:06  计时器课设\test12 - 副本\LCDDRV\SRC\lcdlib.c
     目录           0  2019-01-03 11:47  计时器课设\test12 - 副本\LCD_Data\
............此处省略51个文件信息

评论

共有 条评论

相关资源