云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数字电子时钟的设计 - 图文

数字电子时钟的设计 - 图文

  • 62 次阅读
  • 3 次下载
  • 2025/5/23 18:40:57

case 0x08; buf[3]=0x0b; break; } }

/*******************************************************/ displa();

if(S1) goto sett_1; for(i=0;<4;i++) delay20ms(); if(S1) goto sett_1; if(ml) {

TR1=0; ET1=0;

buf[0]=hourh; buf[1]=hourl; buf[2]=minuh; buf[3]=minul; return; }

setflag<<1; continue;

sett_1; if(S2) continue; for(i=0;i<4;i++) delay20ms();

if(S2) continue; if(!hh) goto sett_2 { hourh++;

if(hourh!=2) continue; hourh=0; continue; }

sett_2: if(!hl) goto sett_3; {

hourl++;

if(hourh) goto sett_20; if(hourl==10) goto sett_21; continue;

sett_21: hourl=0; continue;

sett_20: if(hourl==3) goto sett_22; continue; sett_22: hourl=0; continue; }

sett_3: if(!mh) goto sett_4; { minuh++;

if(minuh==6) goto sett_30; continue;

sett_30: minuh=0; continue;

}

sett_4: minul++;

if(minul==10) goto sett_40; continue;

sett_40: minul=0;

26

continue; } }

/*********************************************************** ;**********************************************************/ void delay20ms(void) {

uchar i, j;

for(i=0;i<20;i++)

for(j=0;j<255;j++); }

/*********************************************************** ;**********************************************************/ void timerl(void) interrupt 3 using 1 {

TH1=0x3c; /* 100ms 定时常数 */ TL1=0xb0;

conun++; /* 中断次数加1*/

if(count!=5) /* 判到10次(1s)否,不到直接返回 */ return;

ss=!ss; /* ss 闪烁标志求反 */ count=0; }

/********************************************************** ;*********************************************************/ void tl_init(void {

; TMOD=0X11; /*T1 定时方式1*/ TH1=0x3c; TL1=0xb0; }

27

搜索更多关于: 数字电子时钟的设计 - 图文 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

case 0x08; buf[3]=0x0b; break; } } /*******************************************************/ displa(); if(S1) goto sett_1; for(i=0;<4;i++) delay20ms(); if(S1) goto sett_1; if(ml)

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com