版权声明:本文为博主原创**,未经博主允许不得转载。 https://blog.csdn.net/zhoukouguren/article/details/7703043
#include<pic.h>
#define uchar unsigned char
#define uint unsigned int
#define rs_h (PORTC|=0x01)
#define rs_l (PORTC&=0xfe)
#define rs_o (TRISC&=0xfe)
#define rw_h (PORTC|=0x02)
#define rw_l (PORTC&=0xfd)
#define rw_o (TRISC&=0xfd)
#define en_h (PORTC|=0x04)
#define en_l (PORTC&=0xfb)
#define en_o (TRISC&=0xfb)
#define temp_h (PORTC|=0x08)
#define temp_l (PORTC&=0xf7)
#define temp_o (TRISC&=0xf7)
#define temp_i (TRISC|=0x08)
#define led_o (TRISC&=0xef)
#define led_l (PORTC&=0xef)
#define led_h (PORTC|=0x10)
#define LCD PORTB
uchar dat1,dat2;//保存读出的温度z
unsigned long int dat;
|