实验中6位数码管,分别为小时的十位,个位.分钟的十位,个位.秒的十位,个位.6个键盘分别对时秒分进行加一或减一. P1口控制数码管的 A B C D E F G DP.P3--P3.5分别为数码管123456的驱动脚. 我的83039052@.qq.com
用C语言编写程序使89C52单片机实现数字时钟功能,显示时分秒的数码管,p1...
P1=wema[1];delay(8);P2=duma[10];P1=wema[2];delay(8);P2=duma[m_shi];P1=wema[3];delay(8);P2=duma[m_ge];P1=wema[4];delay(8);P2=duma[10];P1=wema[5];delay(8);P2=duma[s_shi];P1=wema[6];delay(8);P2=duma[s_ge];P1=wema[7];delay(8);} void main(){ ...
用C语言编写程序使89C52单片机实现数字时钟功能,急求!
\/* 文件名称:SZ01.c� *\/ \/* 程序功能:带定时闹铃时钟 *\/ \/*---*\/ include <AT89X51.H> \/*包含器件配置文件*\/ define uchar unsigned char define uint unsigned int char DATA_7SEG[10]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,...
求一89c52单片机c语言程序,流水灯+数码管 共同作用
include<reg52.h> define uint unsigned int define uchar unsigned char define LED P3 uchar code TAB[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};unsigned char a,i;unsigned long int temp;void init();void display();void delay(unsigned char );void main(){ init...
寻求89C52单片机+蜂鸣器报警同时LED灯亮+数码管显示的程序,汇编\\C语言...
给你个程序参考吧,#include<reg52.h> include<intrins.h> define uint unsigned int define uchar unsigned char sbit d=P3^4;void delay200ms(void){ unsigned char i,j,k;for(i=5;i>0;i--)for(j=132;j>0;j--)for(k=150;k>0;k--);} void main(){ uchar r,t;r=0xfe;whi...
单片机C语言该怎么编写时钟程序?
这个是简单的数码管时钟显示如果有需要,我写过比较完善的1602显示时钟.显示控制年月日等等.#include<reg51.h> sbit Begin=P2^0;sbit Hour=P2^1;sbit Mus=P2^2;sbit End=P2^3;unsigned char code Tab[]={ 0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x77,0x7c,0x39,0x...
...的单片机用数码管显示计时60秒的C语言程序,程序一定要带有解释和P...
\/***程序仿真用89c52 数码管用共阳极数码管 P0口段选,P3.0和P3.1位选 定时器2用法见百度“T2CON”***\/ include<reg52.h> define uint unsigned int define uchar unsigned char uchar code num[12]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0xff,0xbf}; \/\/共阳极...
...温度的单片机的C语言程序,运用的是89c52单片机,附上电路图,谢谢...
include<reg52.h> #define uchar unsigned char #define uint unsigned int sbit DQ=P1^4; \/\/ds18b20与单片机连接口 unsigned char code str[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f,0x00,0x40} ; \/\/共阴数码管字码表unsigned char code str1[]={0x0bf,0x86,...
单片机数字钟显示不出来
1、先要排除硬件问题。很简单,首先搞清楚,数码管是否使用正确。是共阳极的还是工阴极的。测试方法也很简单,如果是共阳极的数码管,就在另外一端接地,看数码管亮不亮。共阴极的则想反。最后,用一个最简单的程序,去测试数码管是否工作正常。如果正常,说明,电路没问题。(以我个人经验,如果电路是...