熱門(mén): 51單片機(jī) | 24小時(shí)必答區(qū) | 單片機(jī)教程 | 單片機(jī)DIY制作 | STM32 | Cortex M3 | 模數(shù)電子 | 電子DIY制作 | 音響/功放 | 拆機(jī)樂(lè)園 | Arduino | 嵌入式OS | 程序設(shè)計(jì)
3111| 4
|
兩位數(shù)碼管計(jì)算時(shí)間,我這個(gè)是兩按鍵實(shí)現(xiàn)開(kāi)始,暫停和清零,求大佬改成一個(gè)按鍵的 |
15黑幣
最佳答案#include
#define uchar unsigned char
#define uint unsigned int
unsigned char code table[16]={0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8,0x80, 0x90, 0x88, 0x83, 0xc6, 0xa1, 0x86, 0x8e};
uchar i=0,temp,flag;
sbit S1 = P2^0;
sbit S2 = P2^1;
sbit K1 = P3^6;
sbit K2 = P3^7;
uchar Time=0;
uchar mode=0;
void Delay_1ms(uint i)//1msÑóê±
{
uc ...
| ||
| ||
| ||
Powered by 單片機(jī)教程網(wǎng)