www.rtmj.net > 用AT89C51单片机编写一个C语言程序实现2个数码管秒...

用AT89C51单片机编写一个C语言程序实现2个数码管秒...

#include #define uchar unsigned char; uchar LED1,LED2; uchar distab[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; uchar num=0;sec,key; void delay(unsigned int a) { unsigned int i,j; for(i=0;i

你能把问题说清楚吗?显示使用数码管还是LED灯,四个按键分别切换成什么样的效果?

#include #define uchar unsigned char uchar tab[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00}; //0到9 uchar num; uchar led[]={0,4,1,2}; void t0isr() interrupt 1 { TH0=(65536-5000)/256; TL0=(65536-5000)%256; switch(n...

#include #define uint unsigned int #define uchar unsigned char sbit dula=P2^6; sbit wela=P2^7; sbit d1=P1^0; uchar num,num1;tt; uchar code table[]={ 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,...

我可以写C语言程序,名是联系 方式

这个设计其实是很基础的一个小系统:最小系统、按键电路、LED驱动电路基本就可以满足你的要求了;如果打算每个数码管可调节,那么再加一个按键切换或者说移位;如果不想加按键数目,那么可以采用按键复用:长按,短按完成。

是要求写三个程序吗?

#include < reg51.h > #include < intrins.h > #define uchar unsigned char #define uint unsigned int #define temp_high 60 //温度报警限设置 uchar data temph; uchar data templ; uchar data dat; uchar temp_buzzer,b,fuhao; uchar code t...

#include #define uchar unsigned char #define uint unsigned int //共阴数码管七段码 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,0x7f,0x6f,0x77}; uchar code table2[]={5,4,3,2};//这就是学号的后4位,自行修改 void di...

#include #define uint unsigned int #define uchar unsigned char uchar temp,aa,miao,fen,shi; sbit m=P3^0; sbit n=P3^1; uchar code table[]={ //数码管编码表 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f}; void display(uchar m...

网站地图

All rights reserved Powered by www.rtmj.net

copyright ©right 2010-2021。
www.rtmj.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com