摘要: #include<reg51.h> #define uchar unsigned char; #define uint unsigned int; uchar position; uchar tt; uchar second; uchar minute; uchar hour; uchar code 阅读全文
posted @ 2021-07-29 17:19 myrj 阅读(273) 评论(0) 推荐(0)
摘要: #include<reg51.h> void main( ) { unsigned char x=1,y=2; unsigned char seg[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; while(1) { P0=seg[x]; 阅读全文
posted @ 2021-07-29 14:02 myrj 阅读(144) 评论(0) 推荐(0)
摘要: #include<reg51.h> #include<intrins.h> void delay(unsigned int i); void main() { unsigned int x,y; while(1) { P1=0x7F; for (x=0;x<8;x++) { delay(60000) 阅读全文
posted @ 2021-07-29 14:00 myrj 阅读(369) 评论(0) 推荐(0)
摘要: #include<reg51.h> unsigned char count=0; unsigned char miao=0; void timer_1() interrupt 3 { TH1=(65536-50000)/256; TL1=(65536-50000)%256; count++; if( 阅读全文
posted @ 2021-07-29 10:07 myrj 阅读(950) 评论(0) 推荐(0)
摘要: #include<reg51.h> #include<intrins.h> /* K1按:D2亮,D9亮,D8亮,D7亮,D6亮,D5亮,D4亮,D3亮,D2亮,D9亮,循环亮 K2按:所有都不亮 K3按:暂停,只有一亮 K4按:D9亮,D2亮,D2亮,D4亮,D5亮,D6亮,D7亮,D8亮,D9亮 阅读全文
posted @ 2021-07-29 08:00 myrj 阅读(334) 评论(0) 推荐(0)