1、我做的是储能式电暖气DB7DB10DB34DB56DB7DB01DB23DB4562D01D23D45D67D01D23D45D67 XTAL218XTAL119ALE301PSN29RST9P0./AD039.1/18P0.2/AD237.3/36P0.4/AD435.5/54P0.6/AD63.7/72P1.01.2P1.23.34P1.45.56P1.67.78P3.0/RXD10.1/TP3.2/IN012./IT13P3.4/014P3.7/RD17.6/W6.5/T15P2.7/A1528P2.0/A821.1/9P2./A023.3/14P2.4/A225.5/136.6/47U
2、AT89S51PROGRAM=改 后 主 程 序 .hexSCFILEs.cD71463D5124D31029D1807E6RW5S4VS1D2VE3LCD1M06L+5VX1CRYSTALC12pC22pR10k C34u7+5V+5V12 3U374012 3U4740 OUT121AD B24 A5C3VREF(+)12 (-)6IN31I42IN53I64IN75 START6OUT58EOC7OE9CLOCK1020OUT714658741OUT39I228IN17I026ALE2U2ADC0832 141LM324LM32432 141LM324LM324R710kR210K R3
3、10kR10k R510kR610K+5V-5VR7(1) 32 141LM324LM324U6NOTU5AND D1DIOE D1(K)20VVSINE R81kK12V程序#include#define uchar unsigned char #define uint unsigned intsbit dula=P26;sbit wela=P21;sbit rs=P20;sbit lcden=P22;sbit time=P23;sbit tem=P27;sbit wr=P36;sbit rd=P37;sbit a=P33;sbit s1=P30;sbit s2=P31;sbit s3=P3
4、2;uchar count,num,s1num;char shi=21,fen=59,miao=50;uchar code table=“ temper: “;uchar code table1=“ 21:59:50“;void delay(uint z)uint x,y;for(x=z;x0;x-)for(y=110;y0;y-);void write_com(uchar com)rs=0;lcden=0;P1=com;delay(5);lcden=1;delay(5);lcden=0;void write_date(uchar date)rs=1;lcden=0;P1=date;delay
5、(5);lcden=1;delay(5);lcden=0;void init()uchar num;dula=0;wela=0;lcden=0;tem=0;time=0;write_com(0x38);write_com(0x0c);write_com(0x06);write_com(0x01);write_com(0x80);for(num=0;num800)tem=0;if(over=22|shi=5void timer1() interrupt 3TH1=(65536-60)/256;TL1=(65536-60)%256;a=a;void timer0() interrupt 1 TH0=(65536-25000)/256;TL0=(65536-25000)%256;count+;if(count=3)count=0;miao+;if(miao=60)miao=0;fen+;if(fen=60)fen=0;shi+;if(shi=24)shi=0;write_sfm(4,shi);jisuan();write_sfm(7,fen);jisuan();write_sfm(10,miao);jisuan();