![]() |
發(fā)布時間: 2018-10-18 09:06
正文摘要:#include<reg52.h> typedef unsigned char u8; typedef unsigned int u16; /********????*********/ #define DATA P0 sbit seg_sel = P1^4; sbit bit_sel = P1^5; sbit K0=P1^0; sbit K1=P ... |
謝謝大家 |
你的程序有缺陷,給你改了一下,你試試。 void t0_server(void) interrupt 1 { TH0 = (65535-10000) / 256; TL0 = (65535-10000) % 256; ms++; if (ms >= 100) { ms = 0; s++; if (s >= 59) { s = 0; min++; if (min >= 59) { min = 0; h++; } if (h >= 24) h=0; } } } |
參與人數(shù) 1 | 黑幣 +10 | 收起 理由 |
---|---|---|
![]() | + 10 | 回帖助人的獎勵! |
時進1那里沒用花括號括起來 |
Powered by 單片機教程網(wǎng)