没有合适的资源?快使用搜索试试~ 我知道了~
LCD1602时钟显示
4星 · 超过85%的资源 需积分: 10 11 下载量 151 浏览量
2009-12-15
19:53:16
上传
评论
收藏 2KB TXT 举报
温馨提示
试读
5页
用LCD1602显示的时钟C程序,非常方便,大家只要改变想要显示的资料就ok了,移植性非常强!!
资源推荐
资源详情
资源评论
/********************************************
************LCD1602显示时钟******************
***********创作时间:2009-03-02**************
********************************************/
#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
sbit rs=P1^0;
sbit rw=P1^1;
sbit lcden=P1^2;
uchar count;
char miao,shi,fen;
uchar code table[]=" 2009-03-02 ";
uchar code table1[]="time: 00:00:00";
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void write_com(uchar com)
{
rs=0;
rw=0;
lcden=0;
P0=com;
delay(5);
lcden=1;
************LCD1602显示时钟******************
***********创作时间:2009-03-02**************
********************************************/
#include<reg51.h>
#define uchar unsigned char
#define uint unsigned int
sbit rs=P1^0;
sbit rw=P1^1;
sbit lcden=P1^2;
uchar count;
char miao,shi,fen;
uchar code table[]=" 2009-03-02 ";
uchar code table1[]="time: 00:00:00";
void delay(uint z)
{
uint x,y;
for(x=z;x>0;x--)
for(y=110;y>0;y--);
}
void write_com(uchar com)
{
rs=0;
rw=0;
lcden=0;
P0=com;
delay(5);
lcden=1;
资源评论
- wwhwh1232015-07-15不错,非常值得学习
linmao_138168
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功