液晶1602的使用C语言程序.docVIP

  • 6
  • 0
  • 约1.89千字
  • 约 6页
  • 2023-08-07 发布于浙江
  • 举报
液晶1602的使用C语言程序 #includeAT89x52.h #includemath.h #define uchar unsigned char #define uint unsigned int //sbit rs=P2^7; //sbit rw=P2^6; //sbit cs=P2^5; sbit rs=P2^4; sbit rw=P2^3; sbit cs=P2^2; sbit DUAN=P2^0; //74HC573的LE端 U5 LED的段选端 sbit WEI=P2^1; //74HC573的LE端 U4 LED的位选端 uchar lcd_data_1[]={2008-07-24}; uchar lcd_data_2[]={00:00:00}; //uchar lcd_data_3[]={0x00,0x1f,0x00,0x1f,0x00,0x1f,0x00,0x1f}; void wei_1() { WEI=1; P0=0; WEI=0; } void duan_1() { DUAN=1; P0=0; DUAN=0; } void nop(){} //延时一会 //=函数原型:delay //=功 能:1ms延时 //=参 数:z //=返 回 值: //=函数性质:私有函数 void delay(uc

文档评论(0)

1亿VIP精品文档

相关文档