旋转led灯源代码.docVIP

  • 78
  • 0
  • 约2.16万字
  • 约 12页
  • 2017-08-18 发布于重庆
  • 举报
旋转led灯源代码

#include reg52.h #include intrins.h #define uchar unsigned char #define uint unsigned int uchar Disp_Line; /***********************************************************************/ //时间定义 /***********************************************************************/ uchar Time_H; //时钟时(0~23) uchar Time_M; //时钟分(0~59) uchar Time_S; //时钟秒(0~59) uchar Time_ms; //时钟毫秒(0~49) (每过20ms,+1) uchar Timer1_JSQ; /***********************************************************************/ //指针定位 /***********************************************************************/ uchar H_Line; //时针定位(0~179) uchar M_Line; //分针定位(0~179) uchar S_Line; //秒针定位(0~179) uchar Disp_time_set; //定时器赋初值 uchar Disp_buffer[10]; /***********************************************************************/ //标志位定义 /***********************************************************************/ bit T20ms_flag; //20毫秒定时溢出标志(0=未溢出,1=溢出) bit New_disp_flag; //显示刷新使能标志(0=禁止,1=使能) uchar SET_EN_FLAG; uchar Disp_mode; uchar speednow,speed; uchar k,l,m; uint Mode_J; /***********************************************************************/ //显示段码表(模拟表盘)(7*7) /***********************************************************************/ uchar code LED_TAB_12369[]= { 0x8C,0x92,0xA2,0xC2,0x84,0x00,0xFE, //12 正向 //0 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x82,0x82,0xFC,0x80,0x82,0x7C, //9 左旋270 度 //3 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x92,0x92,0x92,0x92,0x92,0x4C, //6 左旋180 度 //2 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x82,0x2, 0x1C,0x2, 0x82,0

文档评论(0)

1亿VIP精品文档

相关文档