欢迎来到天天文库
浏览记录
ID:20372728
大小:131.00 KB
页数:26页
时间:2018-10-11
《基于at89s52单片机用12864液晶lcd显示带ds18b20测温万年历电子时钟》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、用at89s52单片机,12864显示,DS18B20测温12864液晶显示屏驱动是lcd.h和lcd.c温度传感器测温在temp.c单片机底层驱动是AT89X52.H包含5个文件AT89X52.Hlcd.clcd.htemp.cnain.c分别保存成.c文件,运行mian.c/*--------------------------------------------------------------------------AT89X52.HHeaderfileforthelowvoltageFlashAtmelAT89C52andAT89LV52.Cop
2、yright(c)1988-2002KeilElektronikGmbHandKeilSoftware,Inc.Allrightsreserved.--------------------------------------------------------------------------*/#ifndef__AT89X52_H__#define__AT89X52_H__/*------------------------------------------------ByteRegisters-----------------------------
3、-------------------*/sfrP0=0x80;sfrSP=0x81;sfrDPL=0x82;sfrDPH=0x83;sfrPCON=0x87;sfrTCON=0x88;sfrTMOD=0x89;sfrTL0=0x8A;sfrTL1=0x8B;sfrTH0=0x8C;sfrTH1=0x8D;sfrP1=0x90;sfrSCON=0x98;sfrSBUF=0x99;sfrP2=0xA0;sfrIE=0xA8;sfrP3=0xB0;sfrIP=0xB8;sfrT2CON=0xC8;sfrT2MOD=0xC9;sfrRCAP2L=0xCA;sfrR
4、CAP2H=0xCB;sfrTL2=0xCC;sfrTH2=0xCD;sfrPSW=0xD0;sfrACC=0xE0;sfrB=0xF0;/*------------------------------------------------P0BitRegisters------------------------------------------------*/sbitP0_0=0x80;sbitP0_1=0x81;sbitP0_2=0x82;sbitP0_3=0x83;sbitP0_4=0x84;sbitP0_5=0x85;sbitP0_6=0x86;s
5、bitP0_7=0x87;/*------------------------------------------------PCONBitValues------------------------------------------------*/#defineIDL_0x01#defineSTOP_0x02#definePD_0x02/*Alternatedefinition*/#defineGF0_0x04#defineGF1_0x08#defineSMOD_0x80/*----------------------------------------
6、--------TCONBitRegisters------------------------------------------------*/sbitIT0=0x88;sbitIE0=0x89;sbitIT1=0x8A;sbitIE1=0x8B;sbitTR0=0x8C;sbitTF0=0x8D;sbitTR1=0x8E;sbitTF1=0x8F;/*------------------------------------------------TMODBitValues-----------------------------------------
7、-------*/#defineT0_M0_0x01#defineT0_M1_0x02#defineT0_CT_0x04#defineT0_GATE_0x08#defineT1_M0_0x10#defineT1_M1_0x20#defineT1_CT_0x40#defineT1_GATE_0x80#defineT1_MASK_0xF0#defineT0_MASK_0x0F/*------------------------------------------------P1BitRegisters-------------------------------
8、-----------------*/sbitP1_
此文档下载收益归作者所有