资源描述:
《单片机温度传感器proteus仿真.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、仿真程序仿真:LED_0EQU30HLED_1EQU31HLED_2EQU32HADCEQU35HTCNTAEQU36HTCNTBEQU37HH_TEMPEQU38HL_TEMPEQU39HFLAGBIT00HH_ALMBITP3.0L_ALMBITP3.1SOUNDBITP3.7CLOCKBITP2.4STBITP2.5EOCBITP2.6OEBITP2.7ORG00HSJMPSTARTORG0BHLJMPINT_T0ORG1BHLJMPINT_T1START:MOVLED_0,#00HMOVLED_1,#00HMOVLED_2,
2、#00HMOVDPTR,#TABLEMOVH_TEMP,#153MOVL_TEMP,#77MOVTMOD,#12HMOVTH0,#245MOVTL0,#0MOVTH1,#(65536-1000)/256MOVTL1,#(65536-1000)/256MOVIE,#8AHCLRCSETBTR0WAIT:SETBH_ALMSETBL_ALMCLRSTSETBSTCLRSTJNBEOC,$SETBOEMOVADC,P1CLROEMOVA,ADCSUBBA,L_TEMPJCLALMMOVA,H_TEMPMOVR0,ADCSUBBA,R0JC
3、HALMCLRTR1LJMPPROC1LALM:CLRL_ALMSETBTR1CLRFLAGLJMPPROC1HALM:CLRH_ALMSETBTR1SETBFLAGLJMPPROC1PROC1:MOVA,ADCMOVB,#100DIVABMOVLED_2,AMOVA,BMOVB,#10DIVABMOVLED_1,AMOVLED_0,BLCALLDISPSJMPWAITINT_T0:CPLCLOCKRETIINT_T1:MOVTH1,#(65536-1000)/256MOVTL1,#(65536-1000)/256CPLSOUNDI
4、NCTCNTAMOVA,TCNTAJBFLAG,I1CJNEA,#30,RETUNESJMPI2I1:CJNEA,#20,RETUNEI2:MOVTCNTA,#0INCTCNTBMOVA,TCNTBCJNEA,#25,RETUNEMOVTCNTA,#0MOVTCNTB,#0LCALLDELAY2RETUNE:RETIDISP:MOVA,LED_0MOVCA,@A+DPTRCLRP2.3MOVP0,ALCALLDELAYSETBP2.3MOVA,LED_1MOVCA,@A+DPTRCLRP2.2MOVP0,ALCALLDELAYSET
5、BP2.2MOVA,LED_2MOVCA,@A+DPTRCLRP2.1MOVP0,ALCALLDELAYSETBP2.1RETDELAY:MOVR6,#10D1:MOVR7,#250DJNZR7,$DJNZR6,D1RETDELAY2:MOVR5,#20D2:MOVR6,#20D3:MOVR7,#250DJNZR7,$DJNZR6,D3DJNZR5,D2RETTABLE:DB3FH,06H,5BH,4FH,66HDB6DH,7DH,07H,7FH,6FHEND