自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (2)
  • 收藏
  • 关注

空空如也

计时器举一反三.pdsprj

初学者必备 动态链接的定时器 #include <reg51.h> unsigned char count=0; unsigned char miao=0; sbit P2_7=P2^7; sbit P1_2=P1^2; sbit P1_3=P1^3; void timer_1() interrupt 3 { TH1 = ( 65536-50000 )/256; TL1 = ( 65536-50000 )%256; count++; if(count==20) { count=0; miao++; if(miao==100)miao=0; } } void disp (unsigned char i) { unsigned int j; unsigned char led[] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; P1_2=0; P1_3=0; P0=led[i/10]; P1_2=1; for(j=0;j<100;j++); P1_2=0; P1_3=0; P0=led[i%10]; P1_3=1; for(j=0;j<100;j++); }

2020-07-02

交通灯.pdsprj

仅供初学者参考 #include <reg51.h> unsigned char t0,t1; void delay0_5s1() { for (t0=0;t0<10;t0++) { TH1=(65536-50000)/256; TL1=(65536-50000)%256; TR1=1; while(!TF1); TF1=0;} } void delay_t1(unsigned char t) { for (t1=0;t1<t;t1++) delay0_5s1(); } void int_0() interrupt 0 { unsigned char i,j,k,l,m; i=P1; j=t0; k=t1; l=TH1; m=TL1; P1=0xdb; delay_t1(20); P1=i; t0=j; t1=k; TH1=l; TL1=m; }

2020-07-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除