Ýëåêòðîííûé òåðìîìåòð

Ðàçðàáîòêà ìèêðîïðîöåññîðíîé ñèñòåìû íà áàçå ìèêðîêîíòîðîëëåðà ýëåêòðîííîãî òåðìîìåòðà äëÿ èñïîëüçîâàíèÿ íà ìåòåîñòàíöèÿõ è â áûòó. Çàäàíèå ðåæèìà ôóíêöèîíàëüíàÿ ñïåöèôèêàöèÿ ïðèáîðà. Ïîñòðîåíèå ñòðóêòóðíîé, ôóíêöèîíàëüíîé ñõåìû, àëãîðèòì ðàáîòû ñèñòåìû.

Ðóáðèêà Êîììóíèêàöèè, ñâÿçü, öèôðîâûå ïðèáîðû è ðàäèîýëåêòðîíèêà
Âèä êóðñîâàÿ ðàáîòà
ßçûê ðóññêèé
Äàòà äîáàâëåíèÿ 15.12.2014
Ðàçìåð ôàéëà 1,3 M

Îòïðàâèòü ñâîþ õîðîøóþ ðàáîòó â áàçó çíàíèé ïðîñòî. Èñïîëüçóéòå ôîðìó, ðàñïîëîæåííóþ íèæå

Ñòóäåíòû, àñïèðàíòû, ìîëîäûå ó÷åíûå, èñïîëüçóþùèå áàçó çíàíèé â ñâîåé ó÷åáå è ðàáîòå, áóäóò âàì î÷åíü áëàãîäàðíû.

CALLPOSIL1;ÏÎÑÛË.

BCFINTCON,7;ÇÀÏÐÅÒ ÏÐÅÐÛÂÀÍÈÉ.

CALL PRIE1;ÍÀ ÏÐÈÅÌ.

MOVFWLSBH;ÏÅÐÅÏÈØÅÌ ÏÐÈÍßÒÛÉ ÁÀÉÒ

MOVWFLSB;Â ÌËÀÄØÈÉ ÐÅÃÈÑÒÐ.

BCFINTCON,7;ÇÀÏÐÅÒ ÏÐÅÐÛÂÀÍÈÉ.

CALLPRIE1;È ÏÐÈÌÅÌ ÑÒÀÐØÈÉ ÁÀÉÒ.

GOTOCXET1;ÍÀ ÏÅÐÅÑ×ÅÒ.

PRIE1

MOVLW.8

MOVWFCOUN;ÇÀÏÈØÅÌ ×ÈÑËÎ ÁÈÒ.

CLRFLSBH;ÎÁÍÓËÈÌ ÐÅÃÈÑÒÐ ÏÐÈÅÌÀ.

PRI1

CALLWUX1;ÂÛÄÀÅÌ ÊÎÐÎÒÊÈÉ ÍÎËÜ È ÆÄÅÌ ÎÒÊËÈÊÀ.

CALLWXO1;ÍÀ ÏÐÈÅÌ.

MOVLW.2;ÇÀÄÅÐÆÊÀ

CALLX4;8 ÌÊÑ.

MOVFWPORTA;ÏÅÐÅÏÈØÅÌ

MOVWFTEMP;ÇÍÀ×ÅÍÈÅ ÏÎÐÒÀ.

BTFSSTEMP,DS1;

BCFSTATUS,0;ÓÑÒÀÍÎÂÈÌ ÁÈÒ ÏÐÈÅÌÀ Â ÍÎËÜ.

BTFSCTEMP,DS1;

BSFSTATUS,0;ÈËÈ ÅÄÈÍÈÖÓ.

RRFLSBH,1;ÇÀÏÈØÅÌ Â ÐÅÃÈÑÒÐ.

MOVLW.12;ÎÁÙÀß ÏÀÓÇÀ 60 ÌÊÑ.

CALLX4;

DECFSZCOUN,1;ÓÌÅÍÜØÈÌ Ñ×ÅÒ×ÈÊ.

GOTOPRI1;ÏÎÂÒÎÐÈÌ ÏÐÈÅÌ.

BSFINTCON,7;ÐÀÇÐÅØÀÅÌ ÏÐÅÐÛÂÀÍÈß.

RETURN;ÂÅÐÍÅÌÑß.

;==========================================

; 22. ÏÎÑÛË ÊÎÌÀÍÄÛ Â DS1.

;==========================================

POSIL1

BCFINTCON,7;ÇÀÏÐÅÒ ÏÐÅÐÛÂÀÍÈÉ.

MOVWFTEMP;ÏÅÐÅÏÈØÅÌ ÂÎ ÂÐÅÌÅÍÍÛÉ.

MOVLW.8;ÇÀÏÈØÅÌ ×ÈÑËÎ ÁÈÒ.

MOVWFCOUN;

POSI1

RRFTEMP,1;ÂÛÒÎËÊÍÅÌ ÌËÀÄØÈÉ ÁÈÒ.

BTFSSSTATUS,0;ÅÑËÈ ÎÍ ÍÓËÅÂÎÉ,

GOTOW0_1;ÏÎØËÅÌ ÈÌÏÓËÜÑ ÍÓËß.

GOTOW1_1;ÈËÈ ÅÄÈÍÈÖÛ.

POS1

DECFSZCOUN,1;ÓÌÅÍÜØÀÅÌ Ñ×ÅÒ×ÈÊ.

GOTOPOSI1;ÍÀ ÑËÅÄÓÞÙÈÉ ÁÈÒ.

BSFINTCON,7;ÐÀÇÐÅØÀÅÌ ÏÐÅÐÛÂÀÍÈß.

RETURN;ÂÎÇÂÐÀÒ.

W0_1

CALLWUX1;ÓÑÒÀÍÎÂÈÌ ÂÛÕÎÄ Â ÍÎËÜ.

MOVLW.15;ÓÄÅÐÆÈÂÀÅÌ 60 ÌÊÑ.

CALL X4;

CALLWXO1;ÍÀ ÂÕÎÄ = 1 ÍÀ ÂÛÕÎÄÅ.

GOTOPOS1;ÏÎÂÒÎÐÈÌ.

W1_1

CALLWUX1;ÊÎÐÎÒÊÈÉ ÍÓËÅÂÎÉ ÈÌÏÓËÜÑ.

CALLWXO1;ÍÀ ÂÕÎÄ = 1 ÍÀ ÂÛÕÎÄÅ.

MOVLW.15;ÓÄÅÐÆÈÂÀÅÌ 60 ÌÊÑ.

CALLX4;

GOTOPOS1;ÏÎÂÒÎÐÈÌ.

;==================================

; 23. ÂÛÄÅËÅÍÈÅ 1.

;==================================

CXET1

BTFSCFLAG1,4;ÍÀ×ÀËÜÍÀß ÏÀÓÇÀ.

GOTO$+3;

BSFFLAG1,4;

RETURN;

BCFFLAG1,3;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

BTFSCLSBH,3;ÅÑËÈ ÈÍÀ×Å,

BSFFLAG1,3;ÒÎ ÓÑÒÀÍÎÂÈÌ ÌÈÍÓÑ.

BTFSSFLAG1,3;ÅÑËÈ ÇÍÀÊ ÏËÞÑ,

GOTO$+7;ÒÎ ÍÅ ÈÍÂÅÐÒÈÐÓÅÌ.

COMFLSB,1;ÏÐÎÈÍÂÅÐÒÈÐÓÅÌ ÌËÀÄØÈÉ

COMFLSBH,1;È ÑÒÀÐØÈÉ ÐÅÃÈÑÒÐÛ ÏÐÈÅÌÀ.

BCFSTATUS,0;

INCFLSB,1;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÓ.

BTFSCSTATUS,0;ÅÑËÈ ÅÑÒÜ ÏÅÐÅÍÎÑ,

INCFLSBH,1;ÒÎ ÓÂÅËÈ×ÈÌ ÑÒÀÐØÈÉ ÐÅÃÈÑÒÐ.

MOVFWLSB;ÂÛÄÅËÈÌ ÄÅÑßÒÛÅ.

ANDLWB'00001111';ÇÀÌÀÑÊÈÐÓÅÌ.

CALLDESATI;ÏÅÐÅÊÎÄÈÐÓÅÌ Ñ ÎÊÐÓÃËÅÍÈÅÌ.

MOVWFDST1;ÇÀÏÈØÅÌ Â ÐÅÃÈÑÒÐ ÄÅÑßÒÛÕ.

MOVLW.4;ÑÄÂÈÃÎÌ ÂÏÐÀÂÎ ÍÀ 4 ÐÀÇÐßÄÀ

MOVWFCOUN;

BCFSTATUS,0;ÂÛÄÅËÈÌ ÖÅËÓÞ ×ÀÑÒÜ.

RRFLSBH,1;

RRFLSB,1;

DECFSZCOUN,1;

GOTO$-4;

MOVLW.251;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

MOVWFSOT1;

BTFSSFLAG1,3;ÅÑËÈ ÈÍÀ×Å,

GOTO$+3;ÒÎ ÓÑÒÀÍÎÂÈÌ

MOVLW.253;ÌÈÍÓÑ.

MOVWFSOT1;

;======================================================

; 24. ÂÛÁÎÐ ÑÐÀÂÍÅÍÈß ÏÎ ÑÎÕÐÀÍÅÍÍÎÌÓ È ÈÇÌÅÐÅÍÍÎÌÓ ÇÍÀÊÀÌ 1.

;======================================================

MAXZ

MOVFWSOT1;ÅÑËÈ ÇÍÀÊÈ ÐÀÂÍÛ,

SUBWFSOT1X,0;

SKPZ;ÒÎ ÎÏÐÅÄÅËÈÌ ÇÍÀÊ.

GOTO$+5;

BTFSSFLAG1,3;ÅÑËÈ ÇÍÀÊ ÏËÞÑ,

GOTOCOPL1X;ÒÎ ÏÐÎÂÅÐßÅÌ ÍÀ ÏÐÅÂÛØÅÍÈÅ.

BTFSCFLAG1,3;ÅÑËÈ ÇÍÀÊ ÌÈÍÓÑ,

GOTOCOMI1X;ÒÎ ÏÐÎÂÅÐßÅÌ ÍÀ ÓÌÅÍÜØÅÍÈÅ.

SKPNC;ÅÑËÈ ÈÇÌÅÐÅÍÍÛÉ ÇÍÀÊ ÌÅÍÜØÅ (+) ÑÎÕÐÀÍÅÍÍÎÃÎ,

GOTOCOXPX;ÒÎ ÑÎÕÐÀÍÈÌ ÈÇÌÅÐÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ.

MINZ

MOVFWSOT1;ÅÑËÈ ÇÍÀÊÈ ÐÀÂÍÛ,

SUBWFSOT1N,0;

SKPZ;ÒÎ ÎÏÐÅÄÅËÈÌ ÇÍÀÊ.

GOTO$+5;

BTFSCFLAG1,3;ÅÑËÈ ÇÍÀÊ ÌÈÍÓÑ,

GOTOCOPL1N;ÒÎ ÑÐÀÂÍÈÂÀÅÌ ÍÀ ÏÐÅÂÛØÅÍÈÅ.

BTFSSFLAG1,3;ÅÑËÈ ÇÍÀÊ ÏËÞÑ,

GOTOCOMI1N;ÒÎ ÑÐÀÂÍÈÂÀÅÌ ÍÀ ÓÌÅÍÜØÅÍÈÅ.

SKPC;ÅÑËÈ ÈÇÌÅÐÅÍÍÛÉ ÇÍÀÊ ÁÎËÜØÅ (-) ÑÎÕÐÀÍÅÍÍÎÃÎ,

GOTOCOXPN;ÒÎ ÑÎÕÐÀÍÈÌ ÈÇÌÅÐÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ.

GOTOBDIN1;ÍÀ ÏÅÐÅÊÎÄÈÐÎÂÊÓ.

;===================================

; 25. ÑÐÀÂÍÅÍÈÅ ÍÀ MAX 1.

;===================================

COPL1X

MOVFWLSB1X;ÅÑËÈ ÑÎÕÐÀÍÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ

SUBWFLSB,0;ÁÎËÜØÅ ÈÇÌÅÐÅÍÍÎÃÎ,

BTFSSSTATUS,0;ÒÎ ÑÎÕÐÀÍÅÍÈß ÍÅÒ.

GOTOMINZ;.

BTFSSSTATUS,2;ÅÑËÈ ÐÀÂÅÍÑÒÂÎ ÖÅËÛÕ,

GOTO$+5;

MOVFWDST1X;ÒÎ ÏÐÎÂÅÐÈÌ ÄÅÑßÒÛÅ.

SUBWFDST1,0;ÅÑËÈ ÁÎËÜØÅ

BTFSSSTATUS,0;ÈËÈ ÐÀÂÍÎ, ÒÎ ÑÎÕÐÀÍÈÌ.

GOTOMINZ;ÈÍÀ×Å ÏÐÎÂÅÐÈÌ ÍÀ ÌÈÍÈÌÓÌ.

COXPX

BTFSSFLAG1,3;-0 ÍÅÒ.

GOTO$+4;

TSTFLSB;

BZMINZ;

MOVFWSOT1;ÑÎÕÐÀÍÈÌ ÌÀÊÑÈÌÀËÜÍÎÅ ÇÍÀ×ÅÍÈÅ.

MOVWFSOT1X;ÇÍÀÊ.

MOVFWLSB;ÑÎÕÐÀÍÈÌ ÍÎÂÎÅ ÇÍÀ×ÅÍÈÅ

MOVWFLSB1X;ÖÅËÛÕ

MOVFWDST1;È ÄÅÑßÒÛÕ.

MOVWFDST1X;

MOVFWMIN;

MOVWFMIN1X;ÌÈÍÓÒÛ.

MOVFWHOU;

MOVWFHOU1X;×ÀÑÛ.

BTFSCFLAG1,3;ÏÅÐÅÏÈØÅÌ ÔËÀÃ ÇÍÀÊÀ

BSFFLAG,0;Â ÔËÀÃ ÕÐÀÍÅÍÈß.

BTFSSFLAG1,3;

BCFFLAG,0;

GOTOMINZ;ÍÀ ÏÐÎÂÅÐÊÓ ÏÎ ÌÈÍÈÌÓÌÓ.

COMI1X

MOVFWLSB1X;ÅÑËÈ ÑÎÕÐÀÍÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ

SUBWFLSB,0;ÌÅÍÜØÅ ÈÇÌÅÐÅÍÍÎÃÎ,

BTFSCSTATUS,2;ÒÎ ÑÎÕÐÀÍÅÍÈß ÍÅÒ.

GOTO$+3;

BTFSSSTATUS,0;ÅÑËÈ ÐÀÂÅÍÑÒÂÎ ÖÅËÛÕ,

GOTOCOXPX;

MOVFWDST1X;ÒÎ ÏÐÎÂÅÐÈÌ ÄÅÑßÒÛÅ.

SUBWFDST1,0;ÅÑËÈ ÌÅÍÜØÅ

BTFSCSTATUS,0;ÈËÈ ÐÀÂÍÎ,

GOTOMINZ;ÑÐÀÂÍÈÌ ÏÎ ÌÈÍÈÌÓÌÓ.

GOTOCOXPX;ÈÍÀ×Å ÑÎÕÐÀÍÈÌ.

;===================================

; 26. ÑÐÀÂÍÅÍÈÅ ÍÀ MIN 1.

;===================================

COPL1N

MOVFWLSB1N;ÅÑËÈ ÑÎÕÐÀÍÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ

SUBWFLSB,0;ÌÅÍÜØÅ ÈÇÌÅÐÅÍÍÎÃÎ,

BTFSSSTATUS,0;ÒÎ ÑÎÕÐÀÍÅÍÈß ÍÅÒ.

GOTOBDIN1;ÏÅÐÅÏÈØÅÌ.

BTFSSSTATUS,2;ÅÑËÈ ÐÀÂÅÍÑÒÂÎ ÖÅËÛÕ,

GOTO$+5;

MOVFWDST1N;ÒÎ ÏÐÎÂÅÐÈÌ ÄÅÑßÒÛÅ.

SUBWFDST1,0;ÅÑËÈ ÈÇÌÅÐÅÍÍÎÅ ÌÅÍÜØÅ

BTFSSSTATUS,0;ÈËÈ ÐÀÂÍÎ ÑÎÕÐÀÍÅÍÍÎÌÓ, ÒÎ ÑÎÕÐÀÍÈÌ.

GOTOBDIN1;ÍÀ ÏÅÐÅÊÎÄÈÐÎÂÊÓ.

COXPN

BTFSSFLAG1,3;-0 ÍÅÒ.

GOTO$+4;

TSTFLSB;

BZBDIN1;

MOVFWSOT1;ÑÎÕÐÀÍÅÍÈÅ ÌÈÍÈÌÀËÜÍÎÃÎ.

MOVWFSOT1N;ÇÍÀÊ.

MOVFWLSB;ÑÎÕÐÀÍÈÌ ÍÎÂÎÅ ÇÍÀ×ÅÍÈÅ

MOVWFLSB1N;ÖÅËÛÕ

MOVFWDST1;È ÄÅÑßÒÛÕ.

MOVWFDST1N;

MOVFWMIN;

MOVWFMIN1N;ÌÈÍÓÒÛ.

MOVFWHOU;

MOVWFHOU1N;×ÀÑÛ.

BTFSCFLAG1,3;ÏÅÐÅÏÈØÅÌ ÔËÀÃ ÇÍÀÊÀ

BSFFLAG,1;Â ÔËÀÃ ÕÐÀÍÅÍÈß.

BTFSSFLAG1,3;

BCFFLAG,1;

GOTOBDIN1;ÍÀ ÏÅÐÅÊÎÄÈÐÎÂÊÓ.

COMI1N

MOVFWLSB1N;ÅÑËÈ ÑÎÕÐÀÍÅÍÍÎÅ ÇÍÀ×ÅÍÈÅ

SUBWFLSB,0;ÌÅÍÜØÅ ÈÇÌÅÐÅÍÍÎÃÎ,

BTFSCSTATUS,2;

GOTO$+3;ÒÎ ÑÎÕÐÀÍÅÍÈß ÍÅÒ.

BTFSSSTATUS,0;ÅÑËÈ ÐÀÂÅÍÑÒÂÎ ÖÅËÛÕ,

GOTOCOXPN;

MOVFWDST1N;ÒÎ ÏÐÎÂÅÐÈÌ ÄÅÑßÒÛÅ.

SUBWFDST1,0;ÅÑËÈ ÌÅÍÜØÅ

BTFSCSTATUS,0;ÈËÈ ÐÀÂÍÎ,

GOTOBDIN1;

GOTOCOXPN;ÒÎ ÑÎÕÐÀÍÈÌ.

;=======================================

; 27. ÏÅÐÅÊÎÄÈÐÎÂÊÀ 1 ÈÇ 2-ÃÎ Â 2_10.

;=======================================

BDIN1

CALLPERZAP;ÏÅÐÅÏÈØÅÌ ÒÅÊÓÙÈÅ ÇÍÀ×ÅÍÈß.

MOVFWLSB;ÏÅÐÅÊÎÄÈÐÓÅÌ

GOTOBZT1;

BDIN2

CALLPERZAP;ÏÅÐÅÏÈØÅÌ ÒÅÊÓÙÈÅ ÇÍÀ×ÅÍÈß.

MOVFWLSB;ÏÅÐÅÊÎÄÈÐÓÅÌ

GOTOBZT2;

PERZAP

MOVFWHOU1X;ÒÅÊÓÙÈÅ ÇÍÀ×ÅÍÈß

MOVWFHOUZ1X;Â ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ.

MOVFWMIN1X

MOVWFMINZ1X

MOVFWHOU1N

MOVWFHOUZ1N

MOVFWMIN1N

MOVWFMINZ1N

MOVFWHOU2X

MOVWFHOUZ2X

MOVFWMIN2X

MOVWFMINZ2X

MOVFWHOU2N

MOVWFHOUZ2N

MOVFWMIN2N

MOVWFMINZ2N

MOVFWLSB1X

MOVWFLSBZ1X

MOVFWDST1X

MOVWFDSTZ1X

MOVFWLSB1N

MOVWFLSBZ1N

MOVFWDST1N

MOVWFDSTZ1N

MOVFWLSB2X

MOVWFLSBZ2X

MOVFWDST2X

MOVWFDSTZ2X

MOVFWLSB2N

MOVWFLSBZ2N

MOVFWDST2N

MOVWFDSTZ2N

RETURN

BDINZ1

BTFSCFLAG1,1;ÅÑËÈ ÈÍÄÈÊÀÖÈß 2 ÄÀÒ×ÈÊÀ,

GOTOBDINZ2;ÒÎ ÈÄÅÌ ÍÀ 2 ÄÀÒ×ÈÊ.

MOVFWLSBZ1X;ÏÎ ÌÀÊÑÈÌÓÌÓ - 1 ÑÒÐÎÊÀ 1 ÄÀÒ×ÈÊÀ.

CALLBZT1;

MOVFWDSTZ1X;

MOVWFDST1;

MOVFWLSBZ1N;ÏÎ ÌÈÍÈÌÓÌÓ - 2 ÑÒÐÎÊÀ 1 ÄÀÒ×ÈÊÀ.

CALLBZT2;

MOVFWDSTZ1N;

MOVWFDST2;

MOVFWHOUZ1X;×ÀÑÛ ÌÀÊÑÈÌÓÌÀ 1.

CALLHZ67;

MOVFWMINZ1X;ÌÈÍÓÒÛ ÌÀÊÑÈÌÓÌÀ 1.

CALLMZ910;

MOVFWSOT1X;ÇÍÀÊ.

MOVWFR12;

RETURN;

BDIN12

BTFSCFLAG1,1;ÅÑËÈ ÈÍÄÈÊÀÖÈß 2 ÑÒÐÎÊÈ,

GOTOBDIN22;ÒÎ ÈÄÅÌ ÍÀ 2 ÑÒÐÎÊÓ.

MOVFWHOUZ1N;ÏÅÐÅÇÀÏÈÑÜ 1 ÄÀÒ×ÈÊÀ 2 ÑÒÐÎÊÈ.

CALLHZ67;×ÀÑÛ ÌÈÍÈÌÓÌÀ 1.

MOVFWMINZ1N;ÌÈÍÓÒÛ ÌÈÍÈÌÓÌÀ 1.

CALLMZ910;

MOVFWSOT1N;ÇÍÀÊ.

MOVWFR12;

RETURN;

BDIN22

MOVFWHOUZ2N;ÏÅÐÅÇÀÏÈÑÜ 2 ÄÀÒ×ÈÊÀ 2 ÑÒÐÎÊÈ.

CALLHZ67;×ÀÑÛ ÌÈÍÈÌÓÌÀ 2.

MOVFWMINZ2N;ÌÈÍÓÒÛ ÌÈÍÈÌÓÌÀ 2.

CALLMZ910;

MOVFWSOT2N;ÇÍÀÊ.

MOVWFR12;

RETURN;

BDINZ2

MOVFWLSBZ2X;ÏÎÄÃÎÒÎÂÊÀ Ê ÈÍÄÈÊÀÖÈÈ 2 ÄÀÒ×ÈÊÀ.

CALLBZT1;ÏÎ ÌÀÊÑÈÌÓÌÓ - 1 ÑÒÐÎÊÀ.

MOVFWDSTZ2X;

MOVWFDST1;

MOVFWLSBZ2N;

CALLBZT2;ÏÎ ÌÈÍÈÌÓÌÓ - 2 ÑÒÐÎÊÀ

MOVFWDSTZ2N;

MOVWFDST2;

MOVFWHOUZ2X;×ÀÑÛ ÌÀÊÑÈÌÓÌÀ 2.

CALLHZ67;

MOVFWMINZ2X;ÌÈÍÓÒÛ ÌÀÊÑÈÌÓÌÀ 2.

CALLMZ910;

MOVFWSOT2X;ÇÍÀÊ.

MOVWFR12;

RETURN;ÏÐÎÂÅÐÈÌ ÊÍÎÏÊÓ.

BZT1

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFDES1;ÒÅÌÏÅÐÀÒÓÐÀ Â ÏÅÐÂÎÉ ÑÒÐÎÊÅ.

MOVFWTEMP;

MOVWFEDI1;

RETURN;

BZT2

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFDES2;ÒÅÌÏÅÐÀÒÓÐÀ ÂÎ ÂÒÎÐÎÉ ÑÒÐÎÊÅ.

MOVFWTEMP;

MOVWFEDI2;

RETURN;

HZ67

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFR6;6 È 7 ÐÀÇÐßÄÛ ÈÍÄÈÊÀÒÎÐÀ.

MOVFWTEMP;×ÀÑÛ.

MOVWFR7;

RETURN;

MZ910

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFR9;9 È 10 ÐÀÇÐßÄÛ ÈÍÄÈÊÀÒÎÐÀ.

MOVFWTEMP;ÌÈÍÓÒÛ.

MOVWFR10;

RETURN;

;======================

; 28. ÈÍÈÖÈÀËÈÇÀÖÈß ÌÊ.

;======================

INIT

BCFSTATUS,6;

BSFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 1.

MOVLWB'00000011';ÏÐÅÄÄÅËÈÒÅËÜ ÏÅÐÅÄ ÒÀÉÌÅÐÎÌ, Ê=16 ...11,

MOVWFOPTION_REG^80H;ÏÎÄÒßÃÈÂÀÞÙÈÅ ÐÅÇÈÑÒÎÐÛ ÂÊËÞ×ÅÍÛ.

MOVLWB'10100000';ÐÀÇÐÅØÅÍÈÅ ÏÐÅÐÛÂÀÍÈß ÏÐÈ ÏÅÐÅÏÎËÍÅÍÈÈ ÒÀÉÌÅÐÀ.

MOVWFINTCON;

MOVLWB'00100000';RA5 - ÍÀ ÂÕÎÄ.

MOVWFTRISA^80H

MOVLWB'00000011';RB0, RB1 - ÍÀ ÂÕÎÄ.

MOVWFTRISB^80H

CLRFVRCON^80H;ÈÎÍ ÂÛÊËÞ×ÅÍ.

CLRFPIE1^80H;

BCFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 0.

CLRFPORTA;ÂÑÅ ÎÁÍÓËßÅÌ È ÓÑÒÀÍÀÂËÈÂÀÅÌ

CLRFPORTB

CLRFT1CON;

CLRFT2CON;

MOVLW7

MOVWFCMCON;ÊÎÌÏÀÐÀÒÎÐÛ ÂÛÊËÞ×ÅÍÛ.

CLRFTMR0

CLRFFLAG

CLRFFLAG1

CLRFFLAG2

BSFFLAG2,0;ÈÍÄÈÊÀÖÈß ÒÅÊÓÙÀß,

CLRFCEK

CLRFMIN

CLRFHOU

CLRFHOUL

CLRFHOUH

CLRFMINL

CLRFMINH

CLRFREID

CLRFKYPC

CLRFCOUN

CLRFCOUZ

CLRFCOUE

CLRFCOYC

CLRFMCK;ÌÈËËÈÑÅÊÓÍÄ.

CLRFEDI2;ÅÄÈÍÈÖÛ 2.

CLRFDES2;ÄÅÑßÒÊÈ 2.

CLRFDST2;ÄÅÑßÒÛÅ 2.

CLRFEDI1;ÅÄÈÍÈÖÛ 1.

CLRFDES1;ÄÅÑßÒÊÈ 1.

CLRFDST1;ÄÅÑßÒÛÅ 1.

CLRFMECDI;ÄÅÑßÒÊÈ ÌÅÑßÖÀ ÈÍÄÈÊÀÖÈÈ.

CLRFDHUDI;ÄÅÑßÒÊÈ ÄÍÅÉ ÈÍÄÈÊÀÖÈÈ.

CLRFMECD;ÄÅÑßÒÊÈ ÌÅÑßÖÀ.

CLRFDHUD;ÄÅÑßÒÊÈ ÄÍÅÉ.

MOVLW.253;-

MOVWFSOT1;ÇÍÀÊ 1.

MOVWFSOT2;ÇÍÀÊ 2.

MOVWFSOT2X;ÇÍÀÊ 2 MAX.

MOVWFSOT1X;ÇÍÀÊ 1 MAX.

MOVLW.251;+

MOVWFSOT1N;ÇÍÀÊ 1 MIN.

MOVWFSOT2N;ÇÍÀÊ 2 MIN.

MOVLW.1

MOVWFDHU;ÄÍÈ ÄÂÎÈ×ÍÛÅ.

MOVWFDHUE;ÅÄÈÍÈÖÛ ÄÍÅÉ.

MOVWFMEC;ÌÅÑßÖ ÄÂÎÈ×ÍÛÉ.

MOVWFMECE;ÅÄÈÍÈÖÛ ÌÅÑßÖÀ.

MOVWFMECEI;ÅÄÈÍÈÖÛ ÌÅÑßÖÀ ÈÍÄÈÊÀÖÈÈ.

MOVWFMECZ;ÄÂÎÈ×ÍÛÉ ÌÅÑßÖ ÇÀÏÈÑÈ/Ñ×ÈÒÛÂÀÍÈß.

MOVWFDHUEI;ÅÄÈÍÈÖÛ ÄÍÅÉ ÈÍÄÈÊÀÖÈÈ.

MOVWFDHUZ;ÄÂÎÈ×ÍÛÅ ÄÍÈ ÇÀÏÈÑÈ/Ñ×ÈÒÛÂÀÍÈß.

CALLPOLNO;ÓÑÒÀÍÎÂÊÀ ÌÀÊÑÈÌÀËÜÍÛÕ ÇÍÀ×ÅÍÈÉ.

GOTOJEKINI;ÍÀ ÈÍÈÖÈÀËÈÇÀÖÈÞ ÈÍÄÈÊÀÒÎÐÀ.

;=======================================

; 29. ÓÑÒÀÍÎÂÊÀ ×ÀÑÎÂ, ÄÀÒÛ.

;=======================================

YC0

INCFHOUH,1;ÓÂÅËÈ×ÈÌ ÄÅÑßÒÊÈ ×ÀÑÎÂ.

MOVLW.3;ÍÅ ÁÎËÅÅ 2.

SUBWFHOUH,0;

SKPNC;

CLRFHOUH;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWHOUH;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFHOUL,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFHOU;È ÏÎËÓ×ÈÌ ÄÂÎÈ×ÍÎÅ ×ÈÑËÎ.

RETURN;ÂÅÐÍÅÌÑß.

YC1

INCFHOUL,1;ÓÂÅËÈ×ÈÌ ÅÄÈÍÈÖÛ ×ÀÑÎÂ.

MOVLW.10;ÍÅ ÁÎËÅÅ 9.

SUBWFHOUL,0;

SKPNC;

CLRFHOUL;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWHOUH;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFHOUL,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFHOU;ÄÂÎÈ×ÍÎÅ ÇÍÀ×ÅÍÈÅ ÍÅ ÄÎËÆÍÎ

ADDLW-18H;ÏÐÅÂÛØÀÒÜ - 24.

SKPC;ÅÑËÈ ÁÎËÜØÅ ÈËÈ ÐÀÂÍÎ 24,

RETURN

CLRFHOU;ÒÎ ÎÁÍÓËÈÌ ×ÀÑÛ ÄÂÎÈ×ÍÛÅ

CLRFHOUL;È ÐÀÇÐßÄÛ ÑÒÀÐØÈÉ

CLRFHOUH;È ÌËÀÄØÈÉ.

RETURN

YC2

INCFMINH,1;ÓÂÅËÈ×ÈÌ ÄÅÑßÒÊÈ ÌÈÍÓÒ.

MOVLW.6;ÍÅ ÁÎËÅÅ 5.

SUBWFMINH,0;

SKPNC;ÅÑËÈ ÁÎËÜØÅ ÈËÈ ÐÀÂÍÎ 6,

CLRFMINH;ÒÎ ÎÁÍÓËÈÌ.

MOVFWMINH;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFMINL,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ È

MOVWFMIN;ÇÀÏÈØÅÌ Â ÄÂÎÈ×ÍÎÌ ÊÎÄÅ.

RETURN

YC3

INCFMINL,1;ÓÂÅËÈ×ÈÌ ÅÄÈÍÈÖÛ ÌÈÍÓÒ.

MOVLW.10;ÍÅ ÁÎËÅÅ 9.

SUBWFMINL,0;

SKPNC;ÅÑËÈ ÁÎËÜØÅ ÈËÈ ÐÀÂÍÎ 10,

CLRFMINL;ÒÎ ÎÁÍÓËÈÌ.

MOVFWMINH;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFMINL,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ È

MOVWFMIN;ÇÀÏÈØÅÌ Â ÄÂÎÈ×ÍÎÌ ÊÎÄÅ.

RETURN

YC4

INCFDHUD,1;ÓÂÅËÈ×ÈÌ ÄÅÑßÒÊÈ ÒÅÊÓÙÈÕ ÄÍÅÉ.

MOVLW.4;ÍÅ ÁÎËÅÅ 3.

SUBWFDHUD,0;

SKPNC;

CLRFDHUD;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWDHUD;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFDHUE,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFDHU;È ÏÎËÓ×ÈÌ ÄÂÎÈ×ÍÎÅ ×ÈÑËÎ.

MOVFWMEC;ÅÑËÈ Â ÒÅÊÓÙÅÌ ÌÅÑßÖÅ

CALLDAYMON;ÌÅÍÜØÅ ÄÍÅÉ,

SUBWFDHU,0;

SKPC;

GOTO$+4;

MOVLW.1;

MOVWFDHUE;ÒÎ ÓÑÒÀÍÎÂÈÌ ÅÄÈÍÈÖÛ

GOTO$-0x0B;È ÅÙÅ ÐÀÇ ÏÐÎÂÅÐÈÌ ÑÓÌÌÓ.

TSTFDHU;ÅÑËÈ ÑÓÌÌÀ ÄÍÅÉ ÍÓËÅÂÀß,

BZ$-5;ÒÎ ÑÍÎÂÀ ÓÑÒÀÍÎÂÈÌ.

MOVFWDHUD;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ

MOVWFDHUDI;ÈÍÄÈÊÀÖÈÈ.

MOVFWDHUE;

MOVWFDHUEI;

RETURN;ÂÅÐÍÅÌÑß.

YC5

INCFDHUE,1;ÓÂÅËÈ×ÈÌ ÅÄÈÍÈÖÛ ÄÍÅÉ.

MOVLW.10;ÍÅ ÁÎËÅÅ 9.

SUBWFDHUE,0;

SKPNC;

CLRFDHUE;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWDHUD;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFDHUE,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFDHU;È ÏÎËÓ×ÈÌ ÄÂÎÈ×ÍÎÅ ×ÈÑËÎ.

MOVFWMEC;ÅÑËÈ Â ÒÅÊÓÙÅÌ ÌÅÑßÖÅ

CALLDAYMON;ÌÅÍÜØÅ ÄÍÅÉ,

SUBWFDHU,0;

SKPC;

GOTO$+5;

CLRFDHUD;ÒÎ ÎÁÍÓËÈÌ ÄÅÑßÒÊÈ ÄÍÅÉ,

MOVLW.1;ÓÑÒÀÍÎÂÈÌ ÅÄÈÍÈÖÛ

MOVWFDHUE;ÄÍÅÉ

GOTO$-0x0C;È ÅÙÅ ÐÀÇ ÏÐÎÂÅÐÈÌ ÑÓÌÌÓ.

TSTFDHU;ÅÑËÈ ÑÓÌÌÀ ÄÍÅÉ ÍÓËÅÂÀß,

BZ$-5;À ÍÓËÅÂÎÃÎ ÄÍß ÍÅÒ, ÒÎ ÑÍÎÂÀ ÓÑÒÀÍÎÂÈÌ.

MOVFWDHUD;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ

MOVWFDHUDI;ÈÍÄÈÊÀÖÈÈ.

MOVFWDHUE;

MOVWFDHUEI;

RETURN;ÂÅÐÍÅÌÑß.

YC6

INCFMECD,1;ÓÂÅËÈ×ÈÌ ÄÅÑßÒÊÈ ÌÅÑßÖÀ.

MOVLW.2;ÍÅ ÁÎËÅÅ 1.

SUBWFMECD,0;

SKPNC;

CLRFMECD;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWMECD;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFMECE,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFMEC;È ÏÎËÓ×ÈÌ ÄÂÎÈ×ÍÎÅ ×ÈÑËÎ.

MOVLW.13;ÍÅ ÁÎËÅÅ 12.

SUBWFMEC,0;

SKPC;

GOTO$+5;

CLRFMECD;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVLW.1;ÓÑÒÀÍÎÂÈÌ ÏÅÐÂÛÉ ÌÅÑßÖ.

MOVWFMECE;

GOTO$-0x0C;

TSTFMEC;ÅÑËÈ ÌÅÑßÖ ÍÓËÅÂÎÉ,

BZ$-5;ÒÎ ÓÑÒÀÍÎÂÈÌ.

MOVFWMECD;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ

MOVWFMECDI;ÈÍÄÈÊÀÖÈÈ.

MOVFWMECE;

MOVWFMECEI;

RETURN;ÂÅÐÍÅÌÑß.

YC7

INCFMECE,1;ÓÂÅËÈ×ÈÌ ÅÄÈÍÈÖÛ ÌÅÑßÖÀ.

MOVLW.10;ÍÅ ÁÎËÅÅ 9.

SUBWFMECE,0;

SKPNC;

CLRFMECE;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVFWMECD;ÏÅÐÅÊÎÄÈÐÓÅÌ Â ÄÂÎÈ×ÍÛÉ

CALLDEBIN;ÊÎÄ ÄÅÑßÒÊÈ.

ADDWFMECE,0;ÏÐÈÁÀÂÈÌ ÅÄÈÍÈÖÛ

MOVWFMEC;È ÏÎËÓ×ÈÌ ÄÂÎÈ×ÍÎÅ ×ÈÑËÎ.

MOVLW.13;ÍÅ ÁÎËÅÅ 12.

SUBWFMEC,0;

SKPC;

GOTO$+5;

CLRFMECD;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÎÁÍÓËÈÌ.

MOVLW.1;ÓÑÒÀÍÎÂÈÌ ÏÅÐÂÛÉ ÌÅÑßÖ.

MOVWFMECE;

GOTO$-0x0C;

TSTFMEC;ÅÑËÈ ÌÅÑßÖ ÍÓËÅÂÎÉ,

BZ$-5;ÒÎ ÓÑÒÀÍÎÂÈÌ.

MOVFWMECD;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ

MOVWFMECDI;ÈÍÄÈÊÀÖÈÈ.

MOVFWMECE;

MOVWFMECEI;

RETURN;ÂÅÐÍÅÌÑß.

YC8M

DECFDHUEI,1;ÓÌÅÍÜØÈÌ ÅÄÈÍÈÖÛ ÄÍÅÉ ÏÐÎÑÌÎÒÐÀ.

MOVLW.255;ÅÑËÈ ÏÅÐÅÕÎÄ ×ÅÐÅÇ 0,

SUBWFDHUEI,0;

BNC$+8;

MOVLW.9;ÒÎ ÓÑÒÀÍÎÂÈÌ 9.

MOVWFDHUEI;

DECFDHUDI,1;ÓÌÅÍÜØÈÌ ÄÅÑßÒÊÈ ÄÍÅÉ

MOVLW.255;ÅÑËÈ ÍÅÒ ÏÅÐÅÕÎÄÀ ×ÅÐÅÇ 0,

SUBWFDHUDI,0;

SKPC;

GOTOYC8COY;ÒÎ ÓÑÒÀÍÎÂÈÌ Ñ×ÅÒ×ÈÊ ÄÍÅÉ.

MOVFWDHUEI;ÅÑËÈ ÑÓÌÌÀ ÄÍÅÉ

ADDWFDHUDI,0;ÍÅ ÐÀÂÍÀ ÍÓËÞ,

SKPZ

GOTOYC8COY;ÒÎ ÓÑÒÀÍÎÂÈÌ Ñ×ÅÒ×ÈÊ ÄÍÅÉ.

DECFMECZ,1;ÈÍÀ×Å ÓÌÅÍÜØÈÌ ÌÅÑßÖ.

SKPZ;ÅÑËÈ ÌÅÑßÖ ÍÓËÅÂÎÉ,

GOTO$+3;

MOVLW.12;ÒÎ ÓÑÒÀÍÎÂÈÌ ÄÅÊÀÁÐÜ.

MOVWFMECZ;

MOVFWMECZ;ÏÐÎÂÅÐÈÌ ×ÈÑËÎ ÄÍÅÉ Â ÌÅÑßÖÅ.

CALLDAYMON;

MOVWFDHUDI;ÏÅÐÅÊÎÄÈÐÓÅÌ ÄÍÈ.

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFDHUDI;

MOVFWTEMP;

MOVWFDHUEI;

MOVFWMECZ;ÏÅÐÅÊÎÄÈÐÓÅÌ ÌÅÑßÖ.

MOVWFTEMP;ÈÇ 2-ÃÎ Â 2_10-Å.

CALLBIDE;ÒÎËÜÊÎ ÄÎ 99!

MOVWFMECDI;

MOVFWTEMP;

MOVWFMECEI;ÄÍÅÉ Â ÒÀÁËÈÖÅ ÌÅÑßÖÀ ÍÀ 1 ÁÎËÜØÅ,

GOTOYC8M;ÏÎÝÒÎÌÓ ÏÎÂÒÎÐÈÌ.

YC8COY

INCFCOYC,1;ÓÌÅÍÜØÈÌ Ñ×ÅÒ×ÈÊ ÄÍÅÉ.

MOVLW.8;ÍÅ ÁÎËÅÅ 7.

SUBWFCOYC,0;

SKPC;

GOTOYC8COU;ÍÀ ÓÑÒÀÍÎÂÊÓ Ñ×ÅÒ×ÈÊÀ Ñ×ÈÒÛÂÀÍÈß.

CLRFCOYC;ÎÁÍÓËÈÌ Ñ×ÅÒ×ÈÊ.

CALLREGIN;ÇÀÃÐÓÇÈÌ ÒÅÊÓÙÈÉ ÄÅÍÜ.

BCFFLAG2,6;ÑÁÐÎÑÈÌ ÔËÀà Ñ×ÅÒ×ÈÊÀ ÄÍÅÉ.

GOTOYC8M;ÓÑÒÀÍÎÂÈÌ Â×ÅÐÀØÍÈÉ ÄÅÍÜ.

YC8COU

BSFFLAG2,5;ÓÑÒÀÍÎÂÈÌ ÔËÀÃ ÂÛÏÎËÍÅÍÍÎÉ ÓÑÒÀÍÎÂÊÈ ÌÈÍÓÑ.

BTFSCFLAG2,6;ÅÑËÈ ÔËÀÃ ÍÓËÅÂÎÉ,

GOTO$+0x09;

CLRFCOYC;

MOVLW.16;ÒÎ ÓÑÒÀÍÎÂÈÌ Ñ×ÅÒ×ÈÊ Ñ×ÈÒÛÂÀÍÈß.

SUBWFCOUZ,0;ÀÄÐÅÑ ×ÒÅÍÈß ÐÀÂÅÍ ÀÄÐÅÑÓ ÇÀÏÈÑÈ

MOVWFCOUE;ÌÈÍÓÑ 16.

BNC$+7;ÅÑËÈ ÏÅÐÅÕÎÄ ×ÅÐÅÇ 0, ÒÎ ÓÑÒÀÍÎÂÈÌ .112.

BSFFLAG2,6;ÓÑÒÀÍÎÂÊÀ ÂÛÏÎËÍÅÍÀ.

RETURN;ÂÅÐÍÅÌÑß.

MOVLW.16;ÑËÅÄÓÞÙÈÉ ÀÄÐÅÑ ×ÒÅÍÈß

SUBWFCOUE,1;ÐÀÂÅÍ ÒÅÊÓÙÅÌÓ ÌÈÍÓÑ 16.

SKPNC;ÅÑËÈ ÏÅÐÅÕÎÄ ×ÅÐÅÇ 0,

RETURN

MOVLW.112;ÒÎ ÓÑÒÀÍÎÂÈÌ .112.

MOVWFCOUE;

BSFFLAG2,6;ÓÑÒÀÍÎÂÊÀ ÂÛÏÎËÍÅÍÀ.

RETURN

YC00

CLRFMIN;ÎÁÍÓËÅÍÈÅ ÐÅÃÈÑÒÐÎÂ

CLRFMINL;ÌÈÍÓÒ È ÑÅÊÓÍÄ

CLRFMINH;ÏÐÈ ÓÑÒÀÍÎÂÊÅ ÏÎ ÑÈÃÍÀËÀÌ

CLRFCEK;ÒÎ×ÍÎÃÎ ÂÐÅÌÅÍÈ.

RETURN

;======================================================

; 30. ÂÎÑÑÒÀÍÎÂËÅÍÈÅ ÒÅÊÓÙÈÕ ÐÅÃÈÑÒÐÎÂ ÈÍÄÈÊÀÖÈÈ ÏÎÑËÅ ÏÐÎÑÌÎÒÐÀ.

;======================================================

REGIN

MOVFWMECD;

MOVWFMECDI;

MOVFWMECE;

MOVWFMECEI;

MOVFWDHUD;

MOVWFDHUDI;

MOVFWDHUE;

MOVWFDHUEI;

MOVFWMEC;

MOVWFMECZ;

RETURN

;=============================================

; 31. ÏÐÅÄÅËÜÍÛÅ ÓÑÒÀÍÎÂÊÈ MAX, MIN  ÏÎËÍÎ×Ü.

;=============================================

POLNO

MOVLW.253;-

MOVWFSOT1X;ÇÍÀÊ 1 MAX.

MOVWFSOT2X;ÇÍÀÊ 2 MAX.

MOVLW.55;-55.

MOVWFLSB1X;ÑÎÕÐÀÍÅÍÍÎÅ ÌÀÊÑÈÌÀËÜÍÎÅ 1 ÄÀÒ×ÈÊÀ.

MOVWFLSB2X;-"- 2 ÄÀÒ×ÈÊÀ.

CLRFDST1X;ÑÎÕÐÀÍÅÍÍÎÅ ÌÀÊÑÈÌÀËÜÍÎÅ ÄÅÑßÒÛÕ 1 ÄÀÒ×ÈÊÀ.

CLRFDST2X;-"- 2 ÄÀÒ×ÈÊÀ.

MOVLW.251;+

MOVWFSOT1N;ÇÍÀÊ 1 MIN.

MOVWFSOT2N;ÇÍÀÊ 2 MIN.

MOVLW.99;+99.

MOVWFLSB1N;ÑÎÕÐÀÍÅÍÍÎÅ ÌÈÍÈÌÀËÜÍÎÅ 1 ÄÀÒ×ÈÊÀ.40

MOVWFLSB2N;-"- 2 ÄÀÒ×ÈÊÀ.

MOVLW.9;0,9

MOVWFDST1N;ÑÎÕÐÀÍÅÍÍÎÅ ÌÈÍÈÌÀËÜÍÎÅ ÄÅÑßÒÛÕ 1 ÄÀÒ×ÈÊÀ.

MOVWFDST2N;-"- 2 ÄÀÒ×ÈÊÀ.

RETURN

;=========================================

; 32. ÈÍÈÖÈÀËÈÇÀÖÈß ÆÊÈ.

;=========================================

JEKINI

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW03;

CALLJEKOM;

CALLSTROB;

MOVLW10;ÂÛÊËÞ×ÅÍÈÅ ÄÈÑÏËÅß.

CALLJEKOM;

CALLSTROB;

MOVLW06;ÑÌÅÙÅÍÈÅ ÊÓÐÑÎÐÀ.

CALLJEKOM;

CALLSTROB;

MOVLW01;ÑÒÈÐÀÍÈÅ ÏÀÌßÒÈ ÄÈÑÏËÅß.

CALLJEKOM;

CALLSTROB;

MOVLW28;ÔÎÐÌÀÒ ÎÁÌÅÍÀ: 4 ÐÀÇÐ., 5õ7, 2 ÑÒÐÎÊÈ.

CALLJEKOM;

CALLSTROB;

MOVLW0C;ÂÊËÞ×ÅÍÈÅ ÄÈÑÏËÅß, ÇÀÏÐÅÒ ÊÓÐÑÎÐÀ.

CALLJEKOM;

CALLSTROB;

GOTOMYLTIK;ÍÀ ÐÀÑÏÐÅÄÅËÈÒÅËÜ.

;=========================================

; 33. ÔÎÐÌÈÐÎÂÀÍÈÅ ÑÒÐÎÁÈÐÓÞÙÅÃÎ ÈÌÏÓËÜÑÀ.

;=========================================

STROB

BSF PORTB,E ;ÂÊËÞ×ÀÅÌ ÑÒÐÎÁ-ÈÌÏÓËÜÑ.

NOP

BCF PORTB,E ;ÂÛÊËÞ×ÀÅÌ ÑÒÐÎÁ.

RETURN ;ÂÅÐÍÅÌÑß.

;===============================================

; 34. ÏÅÐÅÄÀ×À ÊÎÌÀÍÄÛ Â ÆÊÈ.

;===============================================

JEKOM

MOVWF TEMP ;ÏÅÐÅÏÈØÅÌ ÇÍÀ×ÅÍÈÅ ÂÎ ÂÐÅÌÅÍÍÛÉ ÐÅÃÈÑÒÐ.

ANDLW B'11110000';ÇÀÌÀÑÊÈÐÓÅÌ ÌËÀÄØÈÅ ÐÀÇÐßÄÛ ÏÎÄ ÍÎËÜ.

MOVWF PORTB ;ÎÑÒÀËÜÍÛÅ ÐÀÇÐßÄÛ ÏÅÐÅÏÈØÅÌ Â ÏÎÐÒ "Â".

CALL STROB ;ÏÐÎÑÒÐÎÁÈÐÓÅÌ.

CALL PAUSA ;ÏÀÓÇÀ.

MOVFW TEMP

SWAPF TEMP,W ;ÏÎÌÅÍßÅÌ ÌÅÑÒÀÌÈ ÏÎËÓÁÀÉÒÛ.

ANDLW B'11110000';ÇÀÌÀÑÊÈÐÓÅÌ ÑÒÀÐØÈÅ ÐÀÇÐßÄÛ ÏÎÄ ÍÎËÜ.

MOVWF PORTB ;ÏÅÐÅÏÈØÅÌ Â ÏÎÐÒ "Â".

CALL STROB ;ÏÐÎÑÒÐÎÁÈÐÓÅÌ.

PAUSA

MOVLW .255;1 ÌÑ. ÏÀÓÇÀ ÄËß ÇÀÏÈÑÈ ÊÎÌÀÍÄÛ.

ADDLW -1

BTFSS STATUS,2

GOTO $-2

RETURN

;=====================================

; 35. ÇÀÏÈÑÜ ÄÀÍÍÛÕ Â ÆÊÈ.

;=====================================

JEDAT

MOVWF TEMP;ÏÅÐÅÏÈØÅÌ ÇÍÀ×ÅÍÈÅ ÂÎ ÂÐÅÌÅÍÍÛÉ ÐÅÃÈÑÒÐ.

ANDLW B'11110000';ÇÀÌÀÑÊÈÐÓÅÌ ÌËÀÄØÈÅ ÐÀÇÐßÄÛ ÏÎÄ ÍÎËÜ.

ADDLW 30;ÏÅÐÅÂÎÄ Â ÊÎÄ ASCII, ÒÎËÜÊÎ ÄËß ÖÈÔÐ!

MOVWF PORTB;ÎÑÒÀËÜÍÛÅ ÐÀÇÐßÄÛ ÏÅÐÅÏÈØÅÌ Â ÏÎÐÒ "Â".

BSF PORTB,RS;ÓÑÒÀÍÎÂÈÌ R/S ÍÀ ÐÀÇÐÅØÅÍÈÅ ÇÀÏÈÑÈ ÄÀÍÍÛÕ.

CALL STROB;ÏÐÎÑÒÐÎÁÈÐÓÅÌ.

CALL PAUS;ÏÀÓÇÀ ÄËß ÎÑÂÎÁÎÆÄÅÍÈß ÆÊÈ ÎÒ ÖÈÊËÀ ÇÀÏÈÑÈ.

MOVFW TEMP;

SWAPF TEMP,0;ÏÎÌÅÍßÅÌ ÌÅÑÒÀÌÈ ÏÎËÓÁÀÉÒÛ.

ANDLW B'11110000';ÇÀÌÀÑÊÈÐÓÅÌ ÑÒÀÐØÈÅ ÐÀÇÐßÄÛ ÏÎÄ ÍÎËÜ.

MOVWF PORTB;ÎÑÒÀËÜÍÛÅ ÐÀÇÐßÄÛ ÏÅÐÅÏÈØÅÌ Â ÏÎÐÒ "Â".

BSF PORTB,RS;ÓÑÒÀÍÎÂÈÌ R/S ÍÀ ÐÀÇÐÅØÅÍÈÅ ÇÀÏÈÑÈ ÄÀÍÍÛÕ.

CALL STROB;ÏÐÎÑÒÐÎÁÈÐÓÅÌ.

PAUS

MOVLW .10;40 ÌÊÑ. ÏÀÓÇÀ ÄËß ÇÀÏÈÑÈ ÄÀÍÍÛÕ.

ADDLW -1

BTFSS STATUS,2

GOTO $-2

RETURN

;========================================

; 36. ÏÅÐÅÇÀÏÈÑÜ Â ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ.

;========================================

CTP1

BTFSCFLAG2,0;

GOTOTEK1;ÒÅÊÓÙÀß ÈÍÄÈÊÀÖÈß.

BTFSCFLAG2,1;

GOTOINDYC1;ÓÑÒÀÍÎÂÊÀ ×ÀÑÎÂ È ÄÍÅÉ.

GOTOCMOTP1;ÏÐÎÑÌÎÒÐ.

CTP2

BTFSCFLAG2,0;

GOTOTEK2;ÒÅÊÓÙÀß ÈÍÄÈÊÀÖÈß.

BTFSCFLAG2,1;

GOTOINDYC2;ÓÑÒÀÍÎÂÊÀ ×ÀÑÎÂ È ÄÍÅÉ.

GOTOCMOTP2;ÏÐÎÑÌÎÒÐ.

TEK1

MOVFWDHUDI;ÒÅÊÓÙÀß ÈÍÄÈÊÀÖÈß 1 ÑÒÐÎÊÈ, ÄÅÑßÒÊÈ ÄÍÅÉ.

MOVWFR1;

MOVFWDHUEI;ÅÄÈÍÈÖÛ ÄÍÅÉ.

MOVWFR2;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR3;

MOVWFR9;

MOVFWHOUH;ÄÅÑßÒÊÈ ×ÀÑÎÂ.

MOVWFR4;

MOVFWHOUL;ÅÄÈÍÈÖÛ ×ÀÑÎÂ.

MOVWFR5;

MOVLW.240;ÏÓÑÒÎ.

BTFSCCEK,0;ÄÂÎÅÒÎ×ÈÅ ÂÊËÞ×ÀÅÒÑß ×ÅÐÅÇ 1 ÑÅÊÓÍÄÓ.

MOVLW.10;ÄÂÎÅÒÎ×ÈÅ.

MOVWFR6;

MOVFWMINH;ÄÅÑßÒÊÈ ÌÈÍÓÒ.

MOVWFR7;

MOVFWMINL;ÅÄÈÍÈÖÛ ÌÈÍÓÒ.

MOVWFR8;

MOVFWSOT1;ÇÍÀÊ.

MOVWFR10;

MOVFWDES1;ÄÅÑßÒÊÈ ÒÅÌÏÅÐÀÒÓÐÛ 1.

MOVWFR11;

MOVFWEDI1;ÅÄÈÍÈÖÛ ÒÅÌÏÅÐÀÒÓÐÛ 1.

MOVWFR12;

MOVLW.252;ÇÀÏßÒÀß 1.

MOVWFR13;

MOVFWDST1;ÄÅÑßÒÛÅ ÒÅÌÏÅÐÀÒÓÐÛ 1.

MOVWFR14;

MOVLW.14;>.

MOVWFR15;

MOVLW.1;1.

MOVWFR16;

RETURN

TEK2

MOVFWMECDI;ÒÅÊÓÙÀß ÈÍÄÈÊÀÖÈß 2 ÑÒÐÎÊÈ, ÄÅÑßÒÊÈ ÌÅÑßÖÀ.

MOVWFR1;

MOVFWMECEI;ÅÄÈÍÈÖÛ ÌÅÑßÖÀ.

MOVWFR2;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR3;

MOVWFR4;

MOVWFR5;

MOVWFR6;

MOVWFR7;

MOVWFR8;

MOVWFR9;

MOVFWSOT2;ÇÍÀÊ 2.

MOVWFR10;

MOVFWDES2;ÄÅÑßÒÊÈ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR11;

MOVFWEDI2;ÅÄÈÍÈÖÛ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR12;

MOVLW.252;ÇÀÏßÒÀß 2.

MOVWFR13;

MOVFWDST2;ÄÅÑßÒÛÅ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR14;

MOVLW.14;>.

MOVWFR15;

MOVLW.2;2.

MOVWFR16;

RETURN

INDYC1

BTFSSPORTA,HOL;ÅÑËÈ ÍÀÆÀÒÀ ÊÍÎÏÊÀ "ÑÁÐÎÑ",

CALLYC00;ÒÎ ÎÁÍÓËÈÌ ÑÅÊÓÍÄÛ È ÌÈÍÓÒÛ.

MOVLW.123;ÓÑÒÀÍÎÂÊÀ ×ÀÑÎÂ È ÄÀÒÛ 1 ÑÒÐÎÊÀ.

MOVWFR1;×.

MOVLW.17;À.

MOVWFR2;

MOVLW.19;Ñ.

MOVWFR3;

MOVLW.126;Û.

MOVWFR4;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR5;

MOVWFR11;

MOVWFR12;

MOVWFR13;

MOVWFR14;

MOVWFR15;

MOVWFR16;

MOVFWHOUH;ÒÅÊÓÙÈÅ ÇÍÀ×ÅÍÈß: ÄÅÑßÒÊÈ ×ÀÑÎÂ,

MOVWFR6;

MOVFWHOUL;ÅÄÈÍÈÖÛ ×ÀÑÎÂ.

MOVWFR7;

MOVLW.10;ÄÂÎÅÒÎ×ÈÅ.

MOVWFR8;

MOVFWMINH;ÄÅÑßÒÊÈ ÌÈÍÓÒ.

MOVWFR9;

MOVFWMINL;ÅÄÈÍÈÖÛ ÌÈÍÓÒ.

MOVWFR10;

RETURN

INDYC2

MOVLW.176;Ä.

MOVWFR1;

MOVLW.17;À.

MOVWFR2;

MOVLW.36;Ò.

MOVWFR3;

MOVLW.17;À.

MOVWFR4;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR5;

MOVWFR11;

MOVWFR12;

MOVWFR13;

MOVWFR14;

MOVWFR15;

MOVWFR16;

MOVFWDHUDI;ÄÅÑßÒÊÈ ÄÍÅÉ.

MOVWFR6;

MOVFWDHUEI;ÅÄÈÍÈÖÛ ÄÍÅÉ.

MOVWFR7;

MOVLW.253;ÏÐÎ×ÅÐÊ.

MOVWFR8;

MOVFWMECDI;ÄÅÑßÒÊÈ ÌÅÑßÖÀ.

MOVWFR9;

MOVFWMECEI;ÅÄÈÍÈÖÛ ÌÅÑßÖÀ.

MOVWFR10;

RETURN

CMOTP1

MOVFWDHUDI;ÅÑËÈ ÏÐÎÑÌÎÒÐ

ADDWFDHUEI,0;ÑÅÃÎÄÍßØÍÅÉ ÄÀÒÛ,

SUBWFDHU,0;ÒÎ ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ ÍÅ ÌÅÍßÅÌ.

SKPC;

GOTO$+5;

MOVFWMECDI;

ADDWFMECEI,0;

SUBWFMEC,0;

SKPNC;

CALLBDINZ1;ÈÍÀ×Å ÓÑÒÀÍÎÂÈÌ Ñ×ÈÒÀÍÍÛÅ ÇÍÀ×ÅÍÈß 1 ÑÒÐÎÊÈ.

MOVFWDHUDI;ÄÅÑßÒÊÈ ÄÍÅÉ.

MOVWFR1;

MOVFWDHUEI;ÅÄÈÍÈÖÛ ÄÍÅÉ.

MOVWFR2;

MOVLW.14;>.

MOVWFR3;ÏÎ ÓÌÎË×ÀÍÈÞ

MOVLW.1;1.

BTFSCFLAG1,1;ÅÑËÈ ÔËÀÃ ÓÑÒÀÍÎÂËÅÍ,

MOVLW.2;ÒÎ - 2.

MOVWFR4;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR5;

MOVWFR11;

MOVLW.253;ÏÐÎ×ÅÐÊ.

MOVWFR8;

MOVFWDES1;ÄÅÑßÒÊÈ ÒÅÌÏÅÐÀÒÓÐÛ.

MOVWFR13;

MOVFWEDI1;ÅÄÈÍÈÖÛ ÒÅÌÏÅÐÀÒÓÐÛ.

MOVWFR14;

MOVLW.252;ÇÀÏßÒÀß 1.

MOVWFR15;

MOVFWDST1;ÄÅÑßÒÛÅ ÒÅÌÏÅÐÀÒÓÐÛ.

MOVWFR16;

RETURN

CMOTP2

MOVFWDHUDI;ÅÑËÈ ÏÐÎÑÌÎÒÐ

ADDWFDHUEI,0;ÑÅÃÎÄÍßØÍÅÉ ÄÀÒÛ,

SUBWFDHU,0;ÒÎ ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ ÍÅ ÌÅÍßÅÌ.

SKPC;

GOTO$+5;

MOVFWMECDI;

ADDWFMECEI,0;

SUBWFMEC,0;

SKPNC;

CALLBDIN12;ÈÍÀ×Å ÓÑÒÀÍÎÂÈÌ Ñ×ÈÒÀÍÍÛÅ ÇÍÀ×ÅÍÈß 2 ÑÒÐÎÊÈ.

MOVFWMECDI;ÄÅÑßÒÊÈ ÌÅÑßÖÀ.

MOVWFR1;

MOVFWMECEI;ÅÄÈÍÈÖÛ ÌÅÑßÖÀ.

MOVWFR2;

MOVLW.240;ÏÓÑÒÎ.

MOVWFR3;

MOVWFR4;

MOVWFR5;

MOVWFR11;

MOVLW.253;ÏÐÎ×ÅÐÊ.

MOVWFR8;

MOVFWDES2;ÄÅÑßÒÊÈ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR13;

MOVFWEDI2;ÅÄÈÍÈÖÛ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR14;

MOVLW.252;ÇÀÏßÒÀß 2.

MOVWFR15;

MOVFWDST2;ÄÅÑßÒÛÅ ÒÅÌÏÅÐÀÒÓÐÛ 2.

MOVWFR16;

RETURN

;======================================================

; 37. ÂÛÂÎÄ ÇÍÀ×ÅÍÈÉ ÐÅÃÈÑÒÐΠÍÀ ÈÍÄÈÊÀÖÈÞ.

;======================================================

JEKIND

BSFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 1.

BCFTRISB^80H,YCMI;ÍÀ ÂÛÕÎÄ.

BCFTRISB^80H,YCPL;ÍÀ ÂÛÕÎÄ.

BCFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 0.

BTFSSFLAG1,0;ÅÑËÈ ÒÅÊÓÙÀß ÈÍÄÈÊÀÖÈß,

GOTO$+3;ÒÎ ÏÐÎÏÓÑÊÀÅÌ ÈÍÄÈÊÀÖÈÞ ÊÓÐÑÎÐÀ.

BTFSSFLAG,6;ÅÑËÈ ÈÍÄÈÊÀÖÈß ÊÓÐÑÎÐÀ ÂÛÏÎËÍÅÍÀ, ÒÎ ÏÐÎÏÓÑÊÀÅÌ ÅÅ.

GOTO JEKYC;ÏÐÎÈÍÄÈÖÈÐÓÅÌ ÊÓÐÑÎÐ.

MOVLW 02;ÂÎÇÂÐÀÒ ÊÓÐÑÎÐÀ  ÈÑÕÎÄÍÎÅ ÑÎÑÒÎßÍÈÅ.

CALL JEKOM;ÇÀÏÈØÅÌ ÊÎÌÀÍÄÓ.

MOVLW B'10000000';ÊÓÐÑÎÐ ÍÀ 0 ÏÎÇÈÖÈÞ ÏÅÐÂÎÉ ÑÒÐÎÊÈ.

CALL JEKOM;ÇÀÏÈØÅÌ ÊÎÌÀÍÄÓ.

CALLCTP1;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ 1 ÑÒÐÎÊÓ.

CALLJEKCTP;ÇÀÏÈØÅÌ Â ÈÍÄÈÊÀÒÎÐ 1 ÑÒÐÎÊÓ.

MOVLW B'11000000';ÂÒÎÐÀß ÑÒÐÎÊÀ. 0x0C0

CALL JEKOM;ÇÀÏÈØÅÌ ÊÎÌÀÍÄÓ.

CALLCTP2;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ 2 ÑÒÐÎÊÓ.

CALLJEKCTP;ÇÀÏÈØÅÌ Â ÈÍÄÈÊÀÒÎÐ 2 ÑÒÐÎÊÓ.

BCFFLAG,6;

RETURN

JEKCTP

MOVLW.16;

MOVWFCOUN;ÓÑÒÀÍÎÂÈÌ Ñ×ÅÒ×ÈÊ ÈÍÄÈÊÀÖÈÈ ÇÍÀÊÎÌÅÑÒ.

MOVLW R1;ÀÄÐÅÑ ÏÅÐÂÎÃÎ ÐÅÃÈÑÒÐÀ ÈÍÄÈÊÀÖÈÈ.

MOVWFFSR;ÏÎ ÊÎÑÂÅÍÍÎÉ ÀÄÐÅÑÀÖÈÈ

MOVFWINDF;ÓÑÒÀÍÎÂÈÌ ÇÍÀ×ÅÍÈÅ ÐÅÃÈÑÒÐÀ.

CALL JEDAT;ÇÀÏÈØÅÌ Â ÈÍÄÈÊÀÒÎÐ.

DECFCOUN,1;ÓÌÅÍÜØÈÌ Ñ×ÅÒ×ÈÊ.

BTFSCSTATUS,2;ÅÑËÈ ÍÅÒ ÍÓËß,

RETURN;

INCFFSR,1;ÒÎ ÂÛÁÅÐÅÌ ÑËÅÄÓÞÙÈÉ ÐÅÃÈÑÒÐ.

GOTO$-6;ÏÎÂÒÎÐÈÌ ÂÛÂÎÄ ÍÀ ÈÍÄÈÊÀÖÈÞ.

;=======================================

; 38. ÏÐÎÂÅÐÊÀ ÊÍÎÏÎÊ.

;=======================================

KHOP

BSFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 1.

BSFTRISB^80H,YCMI;ÍÀ ÂÕÎÄ.

BSFTRISB^80H,YCPL;ÍÀ ÂÕÎÄ.

BCFSTATUS,5;ÏÅÐÅÕÎÄÈÌ Â ÁÀÍÊ 0.

BTFSSFLAG1,0;ÅÑËÈ ÍÅÒ ÓÑÒÀÍÎÂÊÈ,

GOTOKHOP1;ÊÍÎÏÊÈ ÍÅ ÏÐÎÂÅÐßÞÒÑß.

BTFSCFLAG2,2;ÏÐÈ ÏÐÎÑÌÎÒÐÅ

GOTO$+0x0D;ÍÅ ÏÐÎÂÅÐßÅÒÑß ÐÀÇÐßÄ È ÏËÞÑ.

BTFSCFLAG,3;ÅÑËÈ ÐÀÍÅÅ ÁÛËÀ ÍÀÆÀÒÀ ÊÍÎÏÊÀ,

CALLYCTAL;ÒÎ ÈÄÅÌ ÍÀ ÓÑÒÀÍÎÂÊÓ ÐÀÇÐßÄÀ.

BTFSSPORTB,YCPL;ÅÑËÈ ÊÍÎÏÊÀ ÏËÞÑ ÍÀÆÀÒÀ,

BSFFLAG,3;ÏÎÑÒÀÂÈÌ ÔËÀÃ.

BTFSSPORTB,YCPL;ÅÑËÈ ÊÍÎÏÊÀ ÏËÞÑ ÍÀÆÀÒÀ,

BSFFLAG1,2;ÇÀÏÐÅÙÀÅÌ ÈÍÄÈÊÀÖÈÞ.

BTFSCFLAG,5;ÅÑËÈ ÐÀÍÅÅ ÁÛËÀ ÍÀÆÀÒÀ ÊÍÎÏÊÀ "ÐÀÇÐßÄ",

CALLKYPCY;ÒÎ ÈÄÅÌ ÍÀ ÓÑÒÀÍÎÂÊÓ ÊÓÐÑÎÐÀ.

BTFSSPORTB,PAZ;ÅÑËÈ ÊÍÎÏÊÀ "ÐÀÇÐßÄ" ÍÀÆÀÒÀ,

BSFFLAG,5;ÏÎÑÒÀÂÈÌ ÔËÀÃ.

BTFSCFLAG2,1;ÏÐÈ ÓÑÒÀÍÎÂÊÅ ÄÀÒÛ

GOTOKHOP1;ÊÍÎÏÊÀ ÌÈÍÓÑ ÍÅ ÏÐÎÂÅÐßÅÒÑß.

BTFSCFLAG,2;ÅÑËÈ ÐÀÍÅÅ ÁÛËÀ ÍÀÆÀÒÀ ÊÍÎÏÊÀ ÌÈÍÓÑ,

CALLYCTAM;ÒÎ ÈÄÅÌ ÍÀ ÓÑÒÀÍÎÂÊÓ ÐÀÇÐßÄÀ.

BTFSSPORTB,YCMI;ÅÑËÈ ÊÍÎÏÊÀ ÌÈÍÓÑ ÍÀÆÀÒÀ,

BSFFLAG,2;ÏÎÑÒÀÂÈÌ ÔËÀÃ.

BTFSSPORTB,YCMI;ÅÑËÈ ÊÍÎÏÊÀ ÌÈÍÓÑ ÍÀÆÀÒÀ,

BSFFLAG1,2;ÇÀÏÐÅÙÀÅÌ ÈÍÄÈÊÀÖÈÞ.

KHOP1

BTFSSPORTB,PEJ;ÅÑËÈ ÊÍÎÏÊÀ "ÐÅÆÈÌ" ÍÀÆÀÒÀ,

BSFFLAG,4;ÏÎÑÒÀÂÈÌ ÔËÀÃ.

BTFSSFLAG,4;ÅÑËÈ ÊÍÎÏÊÀ "ÐÅÆÈÌ" ÍÅ ÁÛËÀ ÍÀÆÀÒÀ,

GOTOVUBOR;ÒÎ ÈÄÅÌ ÍÀ ÂÛÁÎÐ ÐÅÆÈÌÀ ÈÍÄÈÊÀÖÈÈ.

BTFSSPORTB,PEJ;ÅÑËÈ ÊÍÎÏÊÀ "ÐÅÆÈÌ" ÍÀÆÀÒÀ,

GOTOVUBOR;ÒÎ ÈÄÅÌ ÍÀ ÂÛÁÎÐ ÐÅÆÈÌÀ ÈÍÄÈÊÀÖÈÈ.

BCFFLAG,4;ÑÁÐÎÑÈÌ ÔËÀÃ ÊÍÎÏÊÈ.

INCFREID,1;ÈÇÌÅÍÅÍÈÅ ÐÅÆÈÌÀ ÈÍÄÈÊÀÖÈÈ.

MOVLW.3;3 ÐÅÆÈÌÀ ÈÍÄÈÊÀÖÈÈ.

SUBWFREID,0;ÅÑËÈ ÁÎËÜØÅ,

BTFSSSTATUS,2;ÒÎ ÏÎÉÄÅÌ ÍÀ ÑÁÐÎÑ.

GOTOVUBOR;ÍÀ ÇÀÏÈÑÜ Â ÐÅÃÈÑÒÐÛ ÈÍÄÈÊÀÖÈÈ.

CLRFREID;ÑÁÐÎÑ ÐÅÆÈÌÀ.

GOTOVUBOR;ÍÀ ÂÛÁÎÐ ÐÅÆÈÌÀ ÈÍÄÈÊÀÖÈÈ.

;======================================================

; 39. ÑÎÕÐÀÍÅÍÈÅ È ÂÎÑÑÒÀÍÎÂËÅÍÈÅ ÇÍÀ×ÅÍÈÉ ÐÅÃÈÑÒÐΠÏÐÈ ÏÐÅÐÛÂÀÍÈÈ.

;======================================================

PRER

MOVWFWTEMP;ÑÎÕÐÀÍÅÍÈÅ ÇÍÀ×ÅÍÈÉ ÐÅÃÈÑÒÐΠW È

MOVFWSTATUS;STATUS,

MOVWFSTEMP;

MOVFWFSR;FSR.

MOVWFFTEMP;

CALLS1;

REPER ;ÂÎÑÑÒÀÍÎÂËÅÍÈÅ ÑÎÕÐÀÍÅÍÍÛÕ ÇÍÀ×ÅÍÈÉ.

MOVFWSTEMP;ÂÎÑÑÒÀÍÎÂËÅÍÈÅ ÐÅÃÈÑÒÐÎÂ:

MOVWFSTATUS;STATUS,

MOVFWFTEMP;

MOVWFFSR;FSR,

MOVFWWTEMP;W.

BCFINTCON,2;ÑÁÐÀÑÛÂÀÅÌ ÔËÀÃ ÏÐÅÐÛÂÀÍÈß ÎÒ TMR0.

RETFIE ;ÂÎÇÂÐÀÒ ÈÇ ÏÐÅÐÛÂÀÍÈß.

;=============================================

; 40. Ñ×ÅÒ È ÏÅÐÅÊÎÄÈÐÎÂÊÀ ÐÅÃÈÑÒÐΠ×-Ì-Ñ.

;=============================================

S1

INCFMCK,1;ÏÐÈÁÀÂÈÌ 1 Â ÐÅÃÈÑÒÐ ÌÈËËÈÑÅÊÓÍÄ.

MOVFWMCK;

ADDLW-0x7D;Ñ×ÈÒÀÅÌ ÄÎ 125.

BTFSSSTATUS,2;

RETURN;

CLRFMCK;ÎÁÍÓËÈÌ.

BTFSCFLAG,7;ÐÀÇÄÅËÈÌ ÍÀ 2.

GOTO$+3;

BSFFLAG,7;

RETURN;

BCFFLAG,7;ÎÁÍÓËÈÌ ÄÅËÈÒÅËÜ.

MOVFWCEK;ÇÀÃÐÓÇÊÀ ÇÍÀ×ÅÍÈÉ ÑÅÊÓÍÄ Â ÐÀÁ. ÐÅÃÈÑÒÐ.

ADDLW-3BH;ÂÛ×ÅÑÒÜ ÈÇ ÐÅÃÈÑÒÐÀ 59.236:4=59-0x0EC;

BZM1;ÑÐÀÂÍÈÒÜ ÍÀ 0, ÅÑËÈ ÐÀÂÍÎ, ÏÅÐÅÉÒÈ ÍÀ M1,

INCFCEK,1;ÈÍÀ×Å ÏÐÈÁÀÂÈÒÜ 1  ÐÅÃÈÑÒÐ ÑÅÊÓÍÄ.

RETURN;

M1

CLRFCEK;ÎÁÍÓËÅÍÈÅ ÐÅÃÈÑÒÐÀ ÑÅÊÓÍÄ.

MOVFWMIN;ÇÀÃÐÓÇÊÀ ÌÈÍÓÒ Â ÐÀÁ. ÐÅÃÈÑÒÐ.

ADDLW-3BH;-59.

BZH1;ÑÐÀÂÍÈÒÜ ÍÀ 0, ÅÑËÈ ÐÀÂÍÎ, ÏÅÐÅÉÒÈ ÍÀ H1.

INCFMIN,1;ÏÐÈÁÀÂÈÒÜ 1 Â ÌÈÍÓÒÛ.

MOVFWMIN;MIN >W.

MOVWFTEMP;.

CALLBIDE;ÏÅÐÅÊÎÄÈÐÓÅÌ.

MOVWFMINH;W > Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÄÅÑßÒÊÎÂ ÌÈÍÓÒ.

MOVFWTEMP;ÂÐÅÌÅÍÍÛÉ

MOVWFMINL;Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÅÄÈÍÈÖ ÌÈÍÓÒ.

RETURN;

H1

CLRFMIN;ÎÁÍÓËßÅÌ ÐÅÃÈÑÒÐ ÌÈÍÓÒ.

CLRFMINL;ÎÁÍÓËßÅÌ ÅÄÈÍÈÖÛ ÌÈÍÓÒ ÈÍÄÈÊÀÖÈÈ.

CLRFMINH;ÎÁÍÓËßÅÌ ÄÅÑßÒÊÈ ÌÈÍÓÒ ÈÍÄÈÊÀÖÈÈ.

MOVFWHOU;ÇÀÃÐÓÇÊÀ ×ÀÑΠ ÐÀÁ. ÐÅÃÈÑÒÐ.

ADDLW-17H;- 23.

BZD1;ÑÐÀÂÍÈÒÜ ÍÀ 0, ÅÑËÈ ÐÀÂÍÎ, ÏÅÐÅÉÒÈ ÍÀ H10.

INCFHOU,1;ÏÐÈÁÀÂÈÒÜ 1  ×ÀÑÛ.

MOVFWHOU;HOU >W.

MOVWFTEMP;

CALLBIDE;ÏÅÐÅÊÎÄÈÐÓÅÌ.

MOVWFHOUH;W >  ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÄÅÑßÒÊΠ×ÀÑÎÂ.

MOVFWTEMP;ÂÐÅÌÅÍÍÛÉ

MOVWFHOUL; ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÅÄÈÍÈÖ ×ÀÑÎÂ.

RETURN;

D1

CLRFHOU;ÎÁÍÓËÅÍÈÅ ÐÅÃÈÑÒÐÀ ×ÀÑÎÂ.

CLRFHOUL;ÎÁÍÓËÅÍÈÅ ÅÄÈÍÈÖ ×ÀÑÎÂ.

CLRFHOUH;ÎÁÍÓËÅÍÈÅ ÄÅÑßÒÊΠ×ÀÑÎÂ.

CALLSAPIS;ÍÀ ÇÀÏÈÑÜ.

CALLPOLNO;ÍÀ ÓÑÒÀÍÎÂÊÓ ÏÐÅÄÅËÜÍÛÕ ÇÍÀ×ÅÍÈÉ.

INCFDHU,1;ÏÐÈÁÀÂÈÒÜ 1 Â ÄÍÈ.

MOVFWMEC;×ÈÑËÎ ÄÍÅÉ ÍÅ ÄÎËÆÍÎ ÏÐÅÂÛØÀÒÜ

CALLDAYMON;×ÈÑËÀ ÄÀÍÍÎÃÎ ÌÅÑßÖÀ.

SUBWFDHU,0;

SKPNC;

GOTOME1;ÈÍÀ×Å ÓÂÅËÈ×ÈÌ ÌÅÑßÖ.

MOVFWDHU;

MOVWFTEMP;

CALLBIDE;ÏÅÐÅÊÎÄÈÐÓÅÌ.

MOVWFDHUD;W > Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÄÅÑßÒÊÎÂ ÄÍÅÉ.

MOVFWTEMP;ÂÐÅÌÅÍÍÛÉ

MOVWFDHUE;Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÅÄÈÍÈÖ ÄÍÅÉ.

RETURN;

ME1

MOVLW.1;ÓÑÒÀÍÎÂÈÌ ÏÅÐÂÎÅ ×ÈÑËÎ.

MOVWFDHU;

MOVWFDHUE;

CLRFDHUD;

INCFMEC,1;ÏÐÈÁÀÂÈÌ ÌÅÑßÖ.

MOVLW.13;ÍÅ ÁÎËÅÅ 12.

SUBWFMEC,0;

SKPNC;

GOTOME1ME;ÅÑËÈ ÁÎËÜØÅ, ÒÎ ÓÑÒÀÍÎÂÈÌ 1 ßÍÂÀÐß.

MOVFWMEC;

MOVWFTEMP;

CALLBIDE;ÏÅÐÅÊÎÄÈÐÓÅÌ.

MOVWFMECD;W > Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÄÅÑßÒÊÎÂ ÌÅÑßÖÀ.

MOVFWTEMP;ÂÐÅÌÅÍÍÛÉ

MOVWFMECE;Â ÐÅÃÈÑÒÐ ÈÍÄÈÊÀÖÈÈ ÅÄÈÍÈÖ ÌÅÑßÖÀ.

RETURN;

ME1ME

MOVLW.1;1 ßÍÂÀÐß.

MOVWFMEC;01-01.

MOVWFMECE;

CLRFMECD;

RETURN;

;=======================================

; 41. ÏÅÐÅÊÎÄÈÐÎÂÊÀ ÈÇ 2-ÃÎ Â 2_10.

;=======================================

BIDE;ÏÅÐÅÊÎÄÈÐÎÂÊÀ ÄÅÑßÒÊÎÂ

CLRFCOUN;ÎÁÍÓËßÅÌ Ñ×ÅÒ×ÈÊ.

ADDLW-.10;ÂÛ×ÒÅÌ 10.

BTFSSSTATUS,0;ÅÑËÈ ÅÑÒÜ ÏÅÐÅÕÎÄ ×ÅÐÅÇ ÍÎËÜ,

GOTO$+4;ÒÎ ÇÀÂÅÐØÀÅÌ ÏÅÐÅÊÎÄÈÐÎÂÊÓ.

MOVWFTEMP;ÈÍÀ×Å ÏÅÐÅÏÈØÅÌ ÍÎÂÎÅ ÇÍÀ×ÅÍÈÅ ÂÎ ÂÐÅÌÅÍÍÛÉ.

INCFCOUN,1;ÓÂÅËÈ×ÈÌ Ñ×ÅÒ×ÈÊ.

GOTO$-5;ÏÎÂÒÎÐÈÌ ÂÛ×ÈÒÀÍÈÅ.

MOVFWCOUN;ÇÍÀ×ÅÍÈÅ Ñ×ÅÒ×ÈÊÀ (ÐÀÂÍÎ ×ÈÑËÓ ÄÅÑßÒÊÎÂ) ÏÅÐÅÏÈØÅÌ Â ÐÀÁÎ×ÈÉ ÐÅÃÈÑÒÐ.

RETURN;ÂÅÐÍÅÌÑß.

;================================

; 42. ÇÀÏÈÑÜ ÇÍÀ×ÅÍÈÉ Â ÏÀÌßÒÜ.

;================================

SAPIS

CALLPERZAP;ÏÅÐÅÏÈØÅÌ ÒÅÊÓÙÈÅ ÇÍÀ×ÅÍÈß Â ÐÅÃÈÑÒÐÛ ÇÀÏÈÑÈ.

BTFSCFLAG,0;ÂÂÎÄÈÌ ÇÍÀÊ Â ÐÅÃÈÑÒÐÛ.

BSFLSBZ1X,7;-

BTFSCFLAG,1;

BSFLSBZ1N,7;-

BTFSCFLAG2,3;

BSFLSBZ2X,7;-

BTFSCFLAG2,4;

BSFLSBZ2N,7;-

MOVLWHOUZ1X;ÏÅÐÂÛÉ ÀÄÐÅÑ ÇÀÏÈÑÛÂÀÅÌÎÃÎ ÐÅÃÈÑÒÐÀ

MOVWFFSR;Â ÐÅÃÈÑÒÐ ÊÎÑÂÅÍÍÎÉ ÀÄÐÅÑÀÖÈÈ.

MOVFWCOUZ;ÍÀ×ÀËÜÍÛÉ ÀÄÐÅÑ ÇÀÏÈÑÈ Â ÐÀÁÎ×ÈÉ ÐÅÃÈÑÒÐ.

BSFSTATUS,5;ÁÀÍÊ 1.

MOVWFEEADR;ÈÇ ÐÀÁÎ×ÅÃÎ Â ÀÄÐÅÑ ÇÀÏÈÑÈ.

BCFINTCON,7;ÇÀÏÐÅÒ ÏÐÅÐÛÂÀÍÈÉ.

CALLZAPIS;ÍÀ ÇÀÏÈÑÜ.

INCFEEADR,1;ÓÂÅËÈ×ÈÌ ÀÄÐÅÑ.

INCFFSR,1;ÂÛÁÅÐÅÌ ÑËÅÄÓÞÙÈÉ ÐÅÃÈÑÒÐ.

BTFSSFSR,7;ÅÑËÈ ÐÅÃÈÑÒÐ ÍÅ ÏÎÑËÅÄÍÈÉ,

GOTO$-4;ÏÎÂÒÎÐÈÌ ÇÀÏÈÑÜ.

BCFSTATUS,5;ÁÀÍÊ 0.

BSFINTCON,7;ÐÀÇÐÅØÀÅÌ ÏÐÅÐÛÂÀÍÈß.

MOVLW.16;ÓÑÒÀÍÎÂÈÌ ÍÀ×ÀËÜÍÛÉ ÀÄÐÅÑ

ADDWFCOUZ,1;ÑËÅÄÓÞÙÅÉ ÇÀÏÈÑÈ.

MOVLW.128;ÅÑËÈ ÝÒÎ ÏÎÑËÅÄÍÈÉ ÀÄÐÅÑ,

SUBWFCOUZ,0;

SKPNC;

CLRFCOUZ;ÒÎ ÍÀ×ÍÅÌ Ñ ÍÓËß.

RETURN;ÂÎÇÂÐÀÒ.

ZAPIS

MOVFWINDF;ÏÅÐÅÏÈØÅÌ ÇÀÏÈÑÛÂÀÅÌÎÅ ÇÍÀ×ÅÍÈÅ

MOVWFEEDATA;Â ÐÅÃÈÑÒÐ ÄÀÍÍÛÕ.

BSF EECON1,WREN;ÐÀÇÐÅØÅÍÈÅ ÇÀÏÈÑÈ.

MOVLW 55H;ÎÁßÇÀÒÅËÜÍÀß ÏÎÑËÅÄÎÂÀÒÅËÜÍÎÑÒÜ

MOVWF EECON2;/

MOVLW 0AAH;/

MOVWF EECON2;/

BSF EECON1,WR;ÏÐÈ ÇÀÏÈÑÈ ÂÎ ÔËÅØ ÏÇÓ.

BTFSC EECON1,WR;ÏÎÊÀ ÍÅ ÁÓÄÅÒ ÎÊÎÍ×ÀÍÈß ÇÀÏÈÑÈ

GOTO $-1;ÕÎÄÈÌ ÏÎ ÊÐÓÃÓ.

BCF EECON1,WREN;ÇÀÏÐÅÒ ÇÀÏÈÑÈ.

RETURN;ÂÎÇÂÐÀÒ.

;=========================

; 43. ÂÛÁÎÐÊÀ ÈÇ ÏÀÌßÒÈ.

;=========================

CXUTKA

MOVLWHOUZ1X;ÏÅÐÂÛÉ ÀÄÐÅÑ ÇÀÏÈÑÛÂÀÅÌÎÃÎ ÐÅÃÈÑÒÐÀ

MOVWFFSR;Â ÐÅÃÈÑÒÐ ÊÎÑÂÅÍÍÎÉ ÀÄÐÅÑÀÖÈÈ.

MOVFWCOUE;ÀÄÐÅÑ ÇÀÏÈÑÈ Â ÐÀÁÎ×ÈÉ ÐÅÃÈÑÒÐ.

BSFSTATUS,5;ÁÀÍÊ 1.

MOVWFEEADR;ÈÇ ÐÀÁÎ×ÅÃÎ Â ÀÄÐÅÑ ÇÀÏÈÑÈ.

BCFINTCON,7;ÇÀÏÐÅÒ ÏÐÅÐÛÂÀÍÈÉ.

CALLAKT;ÍÀ Ñ×ÈÒÛÂÀÍÈÅ.

MOVWFINDF;ÏÅÐÅÏÈØÅÌ Â ÐÅÃÈÑÒÐ.

INCFEEADR,1;ÓÂÅËÈ×ÈÌ ÀÄÐÅÑ.

INCFFSR,1;ÂÛÁÅÐÅÌ ÑËÅÄÓÞÙÈÉ ÐÅÃÈÑÒÐ.

BTFSSFSR,7;ÅÑËÈ ÐÅÃÈÑÒÐ ÍÅ ÏÎÑËÅÄÍÈÉ,

GOTO$-5;ÏÎÂÒÎÐÈÌ Ñ×ÈÒÛÂÀÍÈÅ.

BCFSTATUS,5;ÁÀÍÊ 0.

BSFINTCON,7;ÐÀÇÐÅØÀÅÌ ÏÐÅÐÛÂÀÍÈß.

MOVLW.251;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

MOVWFSOT1X;

BTFSSLSBZ1X,7;ÏÎ 7 ÐÀÇÐßÄÓ ÓÑÒÀÍÎÂÈÌ ÇÍÀÊ.

GOTO$+4;

MOVLW.253;ÌÈÍÓÑ.

MOVWFSOT1X;

BCFLSBZ1X,7;ÑÎÒÐÅÌ ÇÍÀÊ.

MOVLW.251;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

MOVWFSOT1N;

BTFSSLSBZ1N,7;

GOTO$+4;

MOVLW.253;ÌÈÍÓÑ.

MOVWFSOT1N;

BCFLSBZ1N,7;

MOVLW.251;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

MOVWFSOT2X;

BTFSSLSBZ2X,7;

GOTO$+4;

MOVLW.253;ÌÈÍÓÑ.

MOVWFSOT2X;

BCFLSBZ2X,7;

MOVLW.251;ÏÎ ÓÌÎË×ÀÍÈÞ ÇÍÀÊ ÏËÞÑ.

MOVWFSOT2N;

BTFSSLSBZ2N,7;

GOTO$+4;

MOVLW.253;ÌÈÍÓÑ.

MOVWFSOT2N;

BCFLSBZ2N,7;

BCFFLAG2,5;ÑÁÐÎÑ ÔËÀÃÀ ÓÑÒÀÍÎÂÊÈ ÌÈÍÓÑ.

RETURN

AKT

BSFEECON1,RD;×ÒÅÍÈÅ.

BTFSCEECON1,RD;

GOTO$-1;

MOVLW.255;ÅÑËÈ ÏÀÌßÒÜ ÍÅ ÇÀÏÎËÍÅÍÀ,

SUBWFEEDATA,0;ÇÀÏÈØÅÌ -0.

BTFSCSTATUS,Z;

CLRFEEDATA;ÎÁÍÓËÈÌ, Ò.Ê. 255 ÍÅÊÎÐÐÅÊÒÍÎ.

MOVFWEEDATA;ÏÅÐÅÏÈØÅÌ Â ÐÀÁÎ×ÈÉ ÐÅÃÈÑÒÐ.

RETURN;ÂÎÇÂÐÀÒ.

;========================================

; 44. ÐÀÑÏÐÅÄÅËÈÒÅËÜ.

;========================================

MYLTIK

CALLKHOP;ÏÐÎÂÅÐÈÌ ÊÍÎÏÊÈ.

BTFSSFLAG2,0;ÅÑËÈ ÈÍÄÈÊÀÖÈß ÒÅÊÓÙÀß,

GOTOCMOTP;ÒÎ ÏÐÎÏÓÑÊÀÅÌ ÓÑÒÀÍÎÂÊÓ.

CALLJEKIND;ÏÐÎÈÍÄÈÖÈÐÓÅÌ.

BTFSSCEK,0;ÆÄÅÌ ×ÅÒÍÎÉ ÑÅÊÓÍÄÛ.

GOTO$-1;

CALLINIDS1;ÏÐÎÂÅÐÈÌ ÄÀÒ×ÈÊ.

CALLKHOP;ÏÐÎÂÅÐÈÌ ÊÍÎÏÊÈ.

BTFSSFLAG2,0;ÅÑËÈ ÈÍÄÈÊÀÖÈß ÒÅÊÓÙÀß,

GOTOCMOTP;ÒÎ ÏÐÎÏÓÑÊÀÅÌ ÓÑÒÀÍÎÂÊÓ.

CALLJEKIND;ÏÐÎÈÍÄÈÖÈÐÓÅÌ.

BTFSCCEK,0;ÆÄÅÌ ÍÅ×ÅÒÍÎÉ ÑÅÊÓÍÄÛ.

GOTO$-1;

CALLINIDS2;ÒÎ ÏÐÎÂÅÐÈÌ ÂÒÎÐÎÉ ÄÀÒ×ÈÊ.

GOTOMYLTIK;ÂÑÅ ÑÍÀ×ÀËÀ.

CMOTP

BTFSCFLAG2,0;ÅÑËÈ ÈÍÄÈÊÀÖÈß ÒÅÊÓÙÀß,

GOTOMYLTIK;ÒÎ ÈÄÅÌ ÈÇÌÅÐßÒÜ ÒÅÌÏÅÐÀÒÓÐÓ.

BTFSCFLAG2,5;ÏÐÈ ÓÑÒÀÍÎÂÊÅ ÍÅÒ ÂÛÁÎÐÊÈ ÈÇ ÏÇÓ.

CALLCXUTKA;ÂÛÁÎÐÊÀ ÈÇ ÏÇÓ.

BTFSCFLAG1,2;ÅÑËÈ ÇÀÏÐÅÒ ÈÍÄÈÊÀÖÈÈ, ÒÎ ÏÐÎÏÓÑÒÈÌ.

GOTO$+4;

BTFSSFLAG,7;ÊÀÆÄÛÅ 0,5 ÑÅÊ.

GOTO$-1

CALLJEKIND;ÂÛÂÎÄÈÌ ÍÀ ÈÍÄÈÊÀÖÈÞ.

BTFSCFLAG,7;ÊÀÆÄÛÅ 0,5 ÑÅÊ.

GOTO$-1

CALLKHOP;ÏÐÎÂÅÐÈÌ ÊÍÎÏÊÈ.

GOTOCMOTP;

;========================================

END

;========================================

Ðàçìåùåíî íà Allbest.ru


Ïîäîáíûå äîêóìåíòû

  • Ïîñòðîåíèå ñòðóêòóðíîé, ôóíêöèîíàëüíîé è ïðèíöèïèàëüíîé ñõåì ýëåêòðîííîãî òåðìîìåòðà íà îñíîâå ìèêðîêîíòîðîëëåðà, âûáîð ýëåìåíòíîé áàçû, îïòèìàëüíîé äëÿ ðåàëèçàöèè ïîñòàâëåííûõ çàäà÷ ïî äèàïàçîíó õàðàêòåðèñòèê, àëãîðèòì ðàáîòû ñèñòåìû è ïðîãðàììíûé êîä.

    êóðñîâàÿ ðàáîòà [2,4 M], äîáàâëåí 27.12.2009

  • Ðàçðàáîòêà àâòîìàòè÷åñêîé èçìåðèòåëüíîé ñèñòåìû â âèäå ýëåêòðîííîãî òåðìîìåòðà è åå ñèñòåìû óïðàâëåíèÿ. Íàçíà÷åíèå, îñíîâíûå òåõíè÷åñêèå õàðàêòåðèñòèêè òåðìîìåòðà. Îïèñàíèå ðàáîòû ýëåêòðè÷åñêîé ñõåìû. Îñîáåííîñòè ðàçðàáîòêè è èçãîòîâëåíèÿ ïå÷àòíîé ïëàòû.

    êóðñîâàÿ ðàáîòà [170,6 K], äîáàâëåí 12.09.2012

  • Ôóíêöèîíàëüíàÿ ñïåöèôèêàöèÿ è ñòðóêòóðíàÿ ñõåìà àâòîìîáèëüíûõ âîëüòìåòðà-òåðìîìåòðà-÷àñîâ. Îïèñàíèå ðåñóðñîâ ìèêðîêîíòðîëëåðà, íàçíà÷åíèå âûâîäîâ ìèêðîñõåìû. Àññåìáëèðîâàíèå è ðàçðàáîòêà àëãîðèòìà ðàáîòû, êîäû êíîïîê è îïèñàíèå êîìàíä óïðàâëåíèÿ.

    êóðñîâàÿ ðàáîòà [2,0 M], äîáàâëåí 27.12.2009

  • Îáùàÿ õàðàêòåðèñòèêà è ïðèíöèï äåéñòâèÿ ýëåêòðîííîãî òåðìîìåòðà, åãî íàçíà÷åíèå è ñôåðû èñïîëüçîâàíèÿ, ðàçðàáîòêà ïðèíöèïèàëüíîé ñõåìû. Ðàçðàáîòêà òåðìîìåòðà, îáîñíîâàíèå âûáîðà äàò÷èêîâ òåìïåðàòóðû, ðàñ÷åò óçëà ñõåìû ïèòàíèÿ è ôàêòè÷åñêîé ñåáåñòîèìîñòè.

    êóðñîâàÿ ðàáîòà [710,2 K], äîáàâëåí 13.12.2009

  • Ôóíêöèîíàëüíàÿ ñïåöèôèêàöèÿ è ñòðóêòóðíàÿ ñõåìà ýëåêòðîííûõ àâòîìîáèëüíûõ ÷àñîâ-òåðìîìåòðà-âîëüòìåòðà. Ðàçðàáîòêà àëãîðèòìà ðàáîòû è ïðèíöèïèàëüíîé ýëåêòðè÷åñêîé ñõåìû. Ïîëó÷åíèå ïðîøèâêè ïðîãðàììû äëÿ ïàìÿòè ìèêðîêîíòðîëëåðà â ðåçóëüòàòå àññåáëèðîâàíèÿ.

    êóðñîâàÿ ðàáîòà [2,0 M], äîáàâëåí 26.12.2009

  • Ðîëü ìèêðîêîíòðîëëåðíûõ òåõíîëîãèé â ðàçâèòèè ìèêðîýëåêòðîíèêè. Àëãîðèòì ðàçðàáîòêè ìèêðîïðîöåññîðíîé ñèñòåìû òåðìîìåòð-÷àñû íà áàçå ìèêðîêîíòðîëëåðà PIC16F84A. Ðàçðàáîòêà ñõåìû ýëåêòðè÷åñêîé ïðèíöèïèàëüíîé óñòðîéñòâà è ïðîãðàììû äëÿ ìèêðîêîíòðîëëåðà.

    êóðñîâàÿ ðàáîòà [584,1 K], äîáàâëåí 19.03.2012

  • Ïðèíöèï ðàáîòû ýëåêòðè÷åñêèõ òåðìîìåòðîâ, ïðåèìóùåñòâà èñïîëüçîâàíèÿ. Ñòðóêòóðíàÿ ñõåìà óñòðîéñòâà, âûáîð ýëåìåíòíîé áàçû, ñðåäñòâ èíäèêàöèè. Âûáîð ìèêðîêîíòðîëëåðà, ðàçðàáîòêà ôóíêöèîíàëüíîé ñõåìû óñòðîéñòâà. Áëîê-ñõåìà àëãîðèòìà ðàáîòû òåðìîìåòðà.

    êóðñîâàÿ ðàáîòà [3,6 M], äîáàâëåí 23.05.2012

  • Ýëåêòðîííûé çàìîê: îáùàÿ õàðàêòåðèñòèêà è ïðèíöèï äåéñòâèÿ. Àíàëèç âàðèàíòîâ ðåàëèçàöèè óñòðîéñòâà. Ðàçðàáîòêà àëãîðèòìà ôóíêöèîíèðîâàíèÿ, ñòðóêòóðíîé è ýëåêòðè÷åñêîé ïðèíöèïèàëüíîé ñõåìû ýëåêòðîííîãî çàìêà. Áëîê-ñõåìà àëãîðèòìà ðàáîòû ïðîãðàììû.

    êóðñîâàÿ ðàáîòà [363,3 K], äîáàâëåí 10.05.2015

  • Ôóíêöèîíàëüíàÿ ñïåöèôèêàöèÿ, îïèñàíèå îáúåêòà, ñòðóêòóðà ñèñòåìû è ðåñóðñîâ ìèêðîêîíòðîëëåðà. Àññåìáëèðîâàíèå, ïðîãðàììèðîâàíèå ìèêðîêîíòðîëëåðà è ðàçðàáîòêà àëãîðèòìà ðàáîòû óñòðîéñòâà, îïèñàíèå âûáîðà ýëåìåíòíîé áàçû è ðàáîòû ïðèíöèïèàëüíîé ñõåìû.

    êóðñîâàÿ ðàáîòà [2,2 M], äîáàâëåí 02.01.2010

  • Îïèñàíèå àëãîðèòìà ðàáîòû è ðàçðàáîòêà ñòðóêòóðíîé ñõåìû ìèêðîïðîöåññîðíîé ñèñòåìû óïðàâëåíèÿ. Ðàçðàáîòêà ïðèíöèïèàëüíîé ñõåìû. Ïîäêëþ÷åíèå ìèêðîêîíòðîëëåðà, ââîä öèôðîâûõ è àíàëîãîâûõ ñèãíàëîâ. Ðàçðàáîòêà áëîê-ñõåìû àëãîðèòìà ãëàâíîé ïðîãðàììû.

    êóðñîâàÿ ðàáîòà [3,3 M], äîáàâëåí 26.06.2016

Ðàáîòû â àðõèâàõ êðàñèâî îôîðìëåíû ñîãëàñíî òðåáîâàíèÿì ÂÓÇîâ è ñîäåðæàò ðèñóíêè, äèàãðàììû, ôîðìóëû è ò.ä.
PPT, PPTX è PDF-ôàéëû ïðåäñòàâëåíû òîëüêî â àðõèâàõ.
Ðåêîìåíäóåì ñêà÷àòü ðàáîòó.