资源描述:
《基于12864与18B20的温度液晶显示2.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、.基于12864及18B20的温度液晶显示#include#include#include#include#include/*-------------------Definetheregistercommandcode----------------------*/#defineDisp_On0x3f#defineDisp_Off0x3e#defineCol_Add0x40#definePage_Add0xb8#defineStart_Line0xc0#defineLcd
2、_BusP0#defineucharunsignedchar#defineuintunsignedintuchart1,t2,t3,ser;sbitDS=P2^2; /*----------与单片机的单总线接口--------*/uinttemp; /*----------可变温度值------------------*/ucharflag1; /*----------温度正负标志----------------*/sbitMcs=P3^7; sbitScs=P2^4; sbitEna
3、ble=P3^4; sbitDi=P3^5; sbitRW=P3^6; sbitLcd_Rst=P2^1; sbitDIO=P2^5;sbitDU=P2^6;sbitWE=P2^7;charcodeezk[]={....0xF8,0xFC,0x04,0xC4,0x24,0xFC,0xF8,0x00,//-0-0x07,0x0F,0x09,0x08,0x08,0x0F,0x07,0x00,0x00,0x10,0x18,0xFC,0xFC,0x00,0x00,0x00,//-1-0x00,0x08,0x08,0x0F,0x0F,0x08,0x08,
4、0x00,0x08,0x0C,0x84,0xC4,0x64,0x3C,0x18,0x00,//-2-0x0E,0x0F,0x09,0x08,0x08,0x0C,0x0C,0x00,0x08,0x0C,0x44,0x44,0x44,0xFC,0xB8,0x00,//-3-0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00,0xC0,0xE0,0xB0,0x98,0xFC,0xFC,0x80,0x00,//-4-0x00,0x00,0x00,0x08,0x0F,0x0F,0x08,0x00,0x7C,0x7C,0x44,0x44,0xC4,
5、0xC4,0x84,0x00,//-5-0x04,0x0C,0x08,0x08,0x08,0x0F,0x07,0x00,0xF0,0xF8,0x4C,0x44,0x44,0xC0,0x80,0x00,//-6-0x07,0x0F,0x08,0x08,0x08,0x0F,0x07,0x00,0x0C,0x0C,0x04,0x84,0xC4,0x7C,0x3C,0x00,//-7-0x00,0x00,0x0F,0x0F,0x00,0x00,0x00,0x00,0xB8,0xFC,0x44,0x44,0x44,0xFC,0xB8,0x00,//-8-0x07,0x0F,
6、0x08,0x08,0x08,0x0F,0x07,0x00,0x38,0x7C,0x44,0x44,0x44,0xFC,0xF8,0x00,//-9-0x00,0x08,0x08,0x08,0x0C,0x07,0x03,0x00,/*-----------0x30,0x30-----':'已改为'.'-----*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,};ucharcodeFirstPage[]={0x00,0x00,0x00,0x80,0x0
7、0,0x00,0x00,0x80,0x30,0x10,0x80,0x30,0x10,0x80,0xC8,0xB0,0xB0,0x76,0xC8,0xE8,0x76,0x99,0x7C,0x7E,0x9F,0x79,0x7C,0x7E,0x79,0x3E,0x1C,0x09,0x37,0x13,0x09,0x0E,0x01,0x01,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0
8、0,0x0