基于单片机输液点滴测速仿真设计
1476下载地址 https://docs.qq.com/doc/DWEpnR2pOWU91b3p4?pub=1&dver=2.1.0
#include<reg52.h> #include"intrins.h" #include "lcd1602.h" #define uchar unsigned char #define uint unsigned int sbit duiguan=P2^0; //光电对管 sbit anjian=P1^2; //按键 sbit beep=P2^1; //蜂鸣器 uint speed,speed_out; uint num0,num1; uint time_out; uint baojing; void init(); //定时器中断初始化 void delayms(uint); //标准1ms延时 void main() { init(); //定时器中断初始化 LCD1602_init(); //液晶显示初始化 while(1) { LCD1602_write_string(2 , 1 , "Speed:"); //液晶显示speed:字符 LCD1602_write_string(2 , 0 , "Nurse:Alisa"); //液晶显示护士名字 if(duiguan==1)