说明:
1.能够分别检测鱼缸和室内温度并显示2.能够实现鱼缸温度自动调节(升温降温恒温)3.系统能够实现
依据被投食设定相应的定时时间。4.系统可以实现自动和手动模式功能。注:仿真中调节温度是有抖动,
正常现象。
#include <REGX51.H>
#include "1602.H"
#include "DS18B20.h"
extern void DelayMs( unsigned char t );
unsigned int Temp[5]; /* 温度值温度放大10倍 */
int DS18B20DATA[3]; /* DS18B20读到的16位数据 */
code unsigned char DecimalNum[16] = { 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9 }; /* DS18B20小数部分对应的数 */
unsigned char code DuanMa[] = { 0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f };
sbit LED = P3 ^ 1;