⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0000.c

📁 主要功能:利用AT89C/S51作为控制器
💻 C
字号:
						  #include <reg51.h>
#include <intrins.h>
#include <absacc.h>
#define uchar unsigned char
sbit ad_rd=P2^0;
sbit ad_wr=P2^1;
sbit DQ=P3^0;
sbit menu = P2^3;
sbit movkey=P2^2;
sbit addkey = P2^1;
sbit subbkey = P2^0;
sbit RS = P2^5;
sbit RW = P2^6;
sbit E = P2^7;
uchar  k=0;
uchar  ring_flag;
xdata uchar address_a  _at_ 0x0a;
xdata uchar address_b  _at_ 0x0b;
xdata uchar address_c  _at_ 0x0c;
xdata uchar address_d  _at_ 0x0d;
xdata uchar address_year  _at_ 0x09;
xdata uchar address_mouth  _at_ 0x08;
xdata uchar address_day  _at_ 0x07;
xdata uchar address_week  _at_ 0x06;
xdata uchar address_hour_alam _at_ 0x05;
xdata uchar address_hour _at_ 0x04;
xdata uchar address_min_alam  _at_ 0x03;
xdata uchar address_min  _at_ 0x02;
xdata uchar address_sec_alam  _at_ 0x01;
xdata uchar address_sec  _at_ 0x00;
unsigned char t[2],*pt; //用来存放温度值,测温程序就是通过这个数组与主函数通信的
#define year 8
#define mouth 32
#define day 36
#define week 46
#define hour 24
#define min 27
#define sec 30 
#define Lcd_Bus P0 //MCU P0<------> LCM
#define temp_sign 57
unsigned char code dotcode[4]={0,25,50,75};
uchar ring[]={0x20,0x20,0x20,0x20,0x31,0x32,0x3a,0x30,0x30,0x3a,0x30,0x30,0x20,0x20,0x20,0x20};
//uchar code jpg[]={year,mouth,day,week,hour,min,sec};
uchar midbuf[12];
unsigned char bmp[]={
////// 0     1    2    3    4    5    6    7    8    9    10  11   12   13   14   15
	  0x20,0x20,0xb9,0xab,0xd4,0xaa,0x32,0x30,0x30,0x38,0xc4,0xea,0x20,0x20,0x20,0x20,
////// 16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31
//////
      0xb1,0xb1,0xbe,0xa9,0xca,0xb1,0xbc,0xe4,0x31,0x32,0x3a,0x30,0x30,0x3a,0x30,0x30,
//////  32  33   34   35   36   37   38   39   40   41   42   43   44   45   46   47
      0x30,0x37,0xd4,0xc2,0x30,0x38,0xc8,0xd5,0x20,0x20,0xd0,0xc7,0xc6,0xda,0xc1,0xf9,
////////48  49   50   51   52   53   54   55   56   57   58   59   60   61   62   63
      0xbb,0xb7,0xbe,0xb3,0xce,0xc2,0xb6,0xc8,0x3a,0x20,0x32,0x38,0x2e,0x32,0xa1,0xe6};
/////////////////////////////////////////////////////////////////////////
// Bitmap点阵数据表                                                    //
// 图片: C:\..赝嘉疵

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -