初学者必备 动态链接的定时器 #include 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++); }
2023-06-19 15:46:02 22KB c语言单片机
1
阶跃响应采样数据,文章数据可换成(阀位i,温度i),采用MATLAB手把手教授利用实验数据求传递函数。注意:一定是连续时间内采样数据,采样周期<=1s即可。
1