12 2020 档案
摘要:#include <reg51.h> #include <intrins.h> sbit s=P2^5; int i=200; void main() { TMOD=0x01; TH0=0xee; TL0=0x00; EA=1; ET0=1; TR0=1; P1=0xff; while(1); {;
阅读全文
摘要:要求:使用一个外部中断和定时器中断,P1口连接的8个发光二极管; 系统通过定时器中断的方式使得LED呈流水灯显示,外部中断打断定时器中断,控制8个流水灯闪烁显示。 代码如下: #include <reg51.h> #include <intrins.h> #define uchar unsigned
阅读全文
摘要:#include <stdio.h> #include <math.h> //定义函数 f(x)=a*x1*x1 + b*x2*x2 + c*x1*x2 + d*x1 + e*x2 + f int a, b, c, d, e, f; double e1[2] = { 1,0 }; double e2
阅读全文

浙公网安备 33010602011771号