80c51单片机用汇编语言4个独立按键如何分别控制4个数码管从0到9到0...答:MOV A ,R2 RL A MOV R2 ,A ACALL DELAY INC R0 CJNE R0 ,#DISM4+1,DISB1 RET DELK4:MOV R6 ,#10 SJMP DELA1 DELAY:MOV R6 ,#2 DELA1:MOV R7 ,#150 DJNZ R7 ,DJNZ R6 ,DELA1 RET TABLE:DB 3FH,06H,5BH,4FH,66H;共阴段码表 DB 6DH,7DH,07H,7FH,6FH END ...
keil51单片机数码管滚的显示答:include#include#define uchar unsigned char#define uint unsigned intsbit duan=P2^6; sbit wei=P2^7; uchar code tab[18]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f, 0x6f,0x77,0x7c,0x39,0x5e,0x79,0x00,0x40}; //共阴极数码管段码表uchar idata dis_buf[6]={17,17...
高手帮忙51c单片机——想制作倒计时报警器,求个c程序答:刚写的程序,可以通过S0(功能键),S1(加键),S2(减键)设定初值,倒数为00-00-00时蜂鸣器响,通过八位LED显示;include<reg52.h> include<intrins.h> define uchar unsigned char define uint unsigned int uchar code wei[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//八位位选...
帮帮忙吧,谁有单片机秒表的程序设计!急有!要求可以实现一秒记时和10...答://使用AT89C51单片机,12MHZ晶振,P0口输出段码,P2口作列扫描,用共阳LED数码管 //key0调时位选用,key1加1键,key2为减1键 include "reg51.h"// // char code dis_7[11]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff};/* 共阳LED段码表 "0" "1" "2...