简易秒表c语言程序

2025-09-14

#include\

#define uchar unsigned char #define uint unsigned int

uchar table[]={0x03,0x9f,0x25,0x0d,0x99,0x49,0x41,0x1f,0x01,0x09}; sbit smg0=P2^1; sbit smg1=P2^2; uchar miao,num;

void delay() EA=1; EX0=1; IT0=1; TH0=(65536-50000)/256; TL0=(65536-50000)%6; TMOD=0x01; while(1) { smg0=0; smg1=1; P0=table[miao]; delay(); smg1=0; smg0=1; P2=table[miao/10]; delay(); } }

void delay() {

uint t=500; while(t--); }

void timer()intrrupt 1 {

TH0=(65536-50000)/256; TL0=(65536-50000)%6; num++; if(num==20) { num=0; miao++; if(miao==60) { miao=0; } }

}

void int_0() interrupt 0 {

if((TR0==0)&&(miao==0)) TRO=1; else if(TR0==1) TR0=0; else if((TR0==0)&&(miao!=0)) miao=0; }


简易秒表c语言程序.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2024年专技人员公需科目培训班在线考试答案99分

相关阅读
本类排行
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 7

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219