#include"reg52.h"
#include "intrins.h"
#define uchar unsigned char
#define uint unsigned int
#define LCD_data P0
sbit RS = P2^6;
sbit RW = P2^5;
sbit EN = P2^7;
sbit A_TN9=P1^3;
sbit CLK_TN9=P1^1;
sbit DATA_TN9=P1^0;
bit flag;
unsigned char TN_Data_Buff[5];
unsigned char DATA_INDEX;
unsigned char DATA_NUM;
unsigned char data_tmp;
unsigned char table_mbtemp[]="00.00^C";
float iTemp,MBTemp=11.01;
void show_temp();
void delay()
{
unsigned int i;
for(i=0;i<10;i++);
}
void delay_ms(unsigned int time)
{
unsigned int i,j;
for(i=1;i<=time;i++)
for(j=1;j<=113;j++);
}
void LCD_Write_Com(unsigned char com)
{
delay_ms(5);
RS=0;
RW=0;
EN=1;
P0=com;
_nop_();
EN=0;
}
void LCD_Write_Data(unsigned char Data)
{
delay_ms(5);
RS=1;
RW=0;
EN=1;
P0= Data;
_nop_();
EN=0;
}
链接:https://pan.baidu.com/s/1E_gcNJ1K8RH-yh33pH0GbA 提取码:uy0v
|