BCF STATUS, Z HOUR_L, W 0x04 STATUS, Z M15 STATUS, Z HOUR_L ; ÄÀ - Î×ÈÑÒÈÒÜ ÌËÀÄØÈÉ Ñ×ÅÒ×ÈÊ ×ÀÑÎÂ
CLRF HOUR_H SET_REG_LCD2 ; ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß ÂÛÂÎÄÎÌ
; ÒÅÊÓÙÅÃÎ ÂÐÅÌÅÍÈ ÍÀ ÈÍÄÈÊÀÖÈÞ HOUR_L, W 0x0A ; Ñ×ÅÒ×ÈÊ ÄÎÑ×ÈÒÀË ÄÎ 10 STATUS, Z SET_REG_LCD2 ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß Ñòåïëåð è êàê çàïðàâëÿòü â íåãî ñêîáû êàê âñòàâëÿþòñÿ ñêîáû â ñòåïëåð.
; ÂÛÂÎÄÎÌ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ HOUR_L ; ÄÀ - Î×ÈÑÒÈÒÜ ÌËÀÄØÈÉ Ñ×ÅÒ×ÈÊ ×ÀÑΠHOUR_H ; ÈÍÊÐÅÌÅÍÒÈÐÎÂÀÒÜ ÑÒÀÐØÈÉ Ñ×ÅÒ×ÈÊ ×ÀÑΠSET_REG_LCD2 ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß
; ÂÛÂÎÄÎÌ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ
;- PORTB, 6 ; ÍÀÆÀÒÀ ÊÍÎÏÊÀ «- 1» SET_REG_LCD2 ; ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß ÂÛÂÎÄÎÌ
; ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ
; Ñ×ÅÒ×ÈÊ ÅÄÈÍÈÖ ×ÀÑΠSTATUS, C HOUR_L, F ; ÄÅÊÐÅÌÅÍÒÈÐÎÂÀÒÜ ÌËÀÄØÈÉ Ñ×ÅÒ×ÈÊ ×ÀÑΠSTATUS, C ; ÏÐÎÈÇÎØÅË ÇÀÅÌ SET_REG_LCD2 ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß
; ÂÛÂÎÄÎÌ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ STATUS, C 0x09 ; ÄÀ - ÇÀÃÐÓÇÈÒÜ ÍÀ×ÀËÜÍÎÅ ÇÍÀ×ÅÍÈÅ HOUR_L
;-
; Ñ×ÅÒ×ÈÊ ÄÅÑßÒÊΠ×ÀÑΠHOUR_H, F ; ÄÅÊÐÅÌÅÍÒÈÐÎÂÀÒÜ ÑÒÀÐØÈÉ Ñ×ÅÒ×ÈÊ ×ÀÑΠSTATUS, C ; ÏÐÎÈÇÎØÅË ÇÀÅÌ SET_REG_LCD2 ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß
; ÂÛÂÎÄÎÌ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ STATUS, C 0x02 ; ÄÀ - ÇÀÃÐÓÇÈÒÜ ÍÀ×ÀËÜÍÛÅ ÇÍÀ×ÅÍÈß Â Ñ×ÅÒ×ÈÊÈ
MOVWF HOUR_H 0x04
MOVWF HOUR_L SET_REG_LCD2 ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÓÏÐÀÂËÅÍÈß
; ÂÛÂÎÄÎÌ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß ÍÀ ÈÍÄÈÊÀÖÈÞ
;-_TMR2_4 T2CON, TMR2ON ; ÎÑÒÀÍÎÂÊÀ ÒÀÉÌÅÐÀ TMR2
SET_REG_LCD2 MIN_L, W IND_0 MIN_H, W IND_1 HOUR_L, W IND_2 HOUR_H, W
MOVWF IND_3 POINT, 2 ; ÂÛÊËÞ×ÈÒÜ ÒÎ×ÊÓ ÂÎ 2-Ì ÐÀÇÐßÄÅ POINT, 1 ; ÂÊËÞ×ÈÒÜ ÒÎ×ÊÓ Â 1-Ì ÐÀÇÐßÄÅ INT_SOURCE ; ÂÅÐÍÓÒÜÑß Ê ÏÎÈÑÊÓ ÈÑÒÎ×ÍÈÊΠÏÐÅÐÛÂÀÍÈÉ
;-
Ïîäïðîãðàììà îáðàáîòêè ïðåðûâàíèé ïî âõîäó
INT
Äàííàÿ ïîäïðîãðàììà ïðîâåðÿåò íàæàòèå êíîïîê âûáîðà ðåæèìà. Ïðè ïåðâîì íàæàòèè êíîïêè âêëþ÷àåòñÿ ñîîòâåòñòâóþùèé ðåæèì è ðàçðåøàþòñÿ ïðåðûâàíèÿ ïî âõîäàì <RB4:RB7> îò êíîïîê «Óñòàíîâêà ÷àñîâ», «Óñòàíîâêà ìèíóò», «+1» è «-1». Ïðè ïîâòîðíîì íàæàòèè ýòîé æå êíîïêè ïðîèñõîäèò âûêëþ÷åíèå ñîîòâåòñòâóþùåãî ðåæèìà, çàïðåò ïðåðûâàíèé ïî âõîäàì <RB4:RB7> è, ïðè íåîáõîäèìîñòè, ïðîèçâîäèòñÿ çàïèñü óñòàíîâëåííûõ çíà÷åíèé â EEPROM ïàìÿòü äàííûõ.
;-
INT_INT ; ÎÁÐÀÁÎÒ×ÈÊ ÏÐÅÐÛÂÀÍÈÉ ÏÎ ÂÕÎÄÓ INT
;-
BCF INTCON, INTF ; ÑÁÐÎÑÈÒÜ ÔËÀÃ ÏÐÅÐÛÂÀÍÈß ÏÎ ÂÕÎÄÓ INT
BTFSC PORTA, 2 ; ÍÀÆÀÒÀ ÊÍÎÏÊÀ «ÓÑÒÀÍÎÂÊÀ ÒÅÌÏÅÐÀÒÓÐÛ»
GOTO B_TIME_START ; ÍÅÒ - ÏÅÐÅÕÎÄ Ê ÏÐÎÂÅÐÊÅ ÍÀÆÀÒÈß ÊÍÎÏÊÈ
; «ÓÑÒÀÍÎÂÊÀ ÂÐÅÌÅÍÈ ÂÊËÞ×ÅÍÈß»
BTFSS FLAG_R, 0 ; ÐÅÆÈÌ ÓÑÒÀÍÎÂÊÈ ÒÅÌÏÅÐÀÒÓÐÛ ÂÊËÞ×ÅÍ
GOTO START_UST_T ; ÍÅÒ - ÏÅÐÅÕÎÄ ÍÀ ÏÎÄÏÐÎÃÐÀÌÌÓ ÂÊËÞ×ÅÍÈß ÐÅÆÈÌÀ
; ÓÑÒÀÍÎÂÊÈ ÒÅÌÏÅÐÀÒÓÐÛ
BCF FLAG_R, 0 ; ÂÛÊËÞ×ÈÒÜ ÐÅÆÈÌ ÓÑÒÀÍÎÂÊÈ ÒÅÌÏÅÐÀÒÓÐÛ
BSF FLAG_R, 6 ; ÂÊËÞ×ÈÒÜ ÐÅÆÈÌ ÎÒÎÁÐÀÆÅÍÈß ÒÅÊÓÙÅÃÎ ÂÐÅÌÅÍÈ
BCF INTCON, RBIE ; ÇÀÏÐÅÒÈÒÜ ÏÐÅÐÛÂÀÍÈß ÏÎ ÂÕÎÄÀÌ <RB4:RB7>
;-
; ÇÀÏÈÑÜ Â EEPROM
BANC2
CLRF EEADR ; ÓÑÒÀÍÎÂÊÀ ÍÀ×ÀËÜÍÎÃÎ ÀÄÐÅÑÀ 00h
BANC3
BTFSC EECON1, WR ; ÏÐÎÂÅÐÊÀ ÎÊÎÍ×ÀÍÈß ÇÀÏÈÑÈ Â EEPROM
GOTO $+1
BANC0
MOVF MAX_TL, W ; ×ÒÅÍÈÅ ÄÀÍÍÛÕ ÈÇ ÐÅÃÈÑÒÐÀ MAX_TL
BANC2
MOVWF EEDATA
BANC3
BCF EECON1, EEPGD ; ÇÀÏÈÑÜ ÁÓÄÅÒ ÏÐÎÈÇÂÎÄÈÒÜÑß Â EEPROM
BSF EECON1, WREN ; ÐÀÇÐÅØÅÍÈÅ ÇÀÏÈÑÈ Â EEPROM
MOVLW 0x55 EECON2 0xAA EECON2
BSF EECON1, WR ; ÈÍÈÖÈÀËÈÇÀÖÈß ÇÀÏÈÑÈ
BCF EECON1, WREN ; ÇÀÏÐÅÒ ÇÀÏÈÑÈ ÂEEPROM
BANC2
INCF EEADR, F ; ÓÂÅËÈ×ÈÒÜ ÀÄÐÅÑ ÍÀ 1
BANC3
BTFSC EECON1, WR ; ÏÐÎÂÅÐÊÀ ÎÊÎÍ×ÀÍÈß ÇÀÏÈÑÈ Â EEPROM
GOTO $+1
BANC0
MOVF MAX_TH, W ; ×ÒÅÍÈÅ ÄÀÍÍÛÕ ÈÇ ÐÅÃÈÑÒÐÀ MAX_TH
BANC2
MOVWF EEDATA
BANC3
BCF EECON1, EEPGD ; ÇÀÏÈÑÜ ÁÓÄÅÒ ÏÐÎÈÇÂÎÄÈÒÜÑß Â EEPROM
BSF EECON1, WREN ; ÐÀÇÐÅØÅÍÈÅ ÇÀÏÈÑÈ Â EEPROM
MOVLW 0x55 EECON2 0xAA EECON2
BSF EECON1, WR ; ÈÍÈÖÈÀËÈÇÀÖÈß ÇÀÏÈÑÈ
BCF EECON1, WREN ; ÇÀÏÐÅÒ ÇÀÏÈÑÈ ÂEEPROM
BANC0
GOTO INT_SOURCE ; ÂÅÐÍÓÒÜÑß Ê ÏÎÈÑÊÓ ÈÑÒÎ×ÍÈÊΠÏÐÅÐÛÂÀÍÈÉ
;-
START_UST_T ; ÏÎÄÏÐÎÃÐÀÌÌÀ ÂÊËÞ×ÅÍÈß ÐÅÆÈÌÀ ÓÑÒÀÍÎÂÊÈ ÒÅÌÏÅÐÀÒÓÐÛ
MOVLW B'00000001' ; ÂÊËÞ×ÈÒÜ ÐÅÆÈÌ ÓÑÒÀÍÎÂÊÈ ÒÅÌÏÅÐÀÒÓÐÛ
MOVWF FLAG_R ; ÎÑÒÀËÜÍÛÅ ÂÛÊËÞ×ÈÒÜ
Ñàìîå ÷èòàåìîå:
Ìåòîä ÷àñòîòíîé ìîäóëÿöèè ðàäèîòåõíè÷åñêîãî ñèãíàëà
Çà ïîñëåäíåå âðåìÿ ñóùåñòâåííî ïîâûñèëñÿ òåõíè÷åñêèé óðîâåíü
ýëåêòðîííîé òåõíèêè. Áûñòðîå ðàçâèòèå òðåáóåò ñîçäàíèÿ âñå áîëåå òî÷íîãî è
ñëîæíîãî àâòîìàòèçèðîâàííîãî òåõíîëîãè÷åñêîãî îáîðóäîâàíèÿ äëÿ èçîáðåòåíèÿ
áîëåå ñëîæíûõ è ñîâåðøåííûõ óñòðîéñòâ ñ ëó÷øèìè õàðàêòåðèñòèêàìè è ïàðàìåòðàìè,
ìåíüøèìè ãàáàðèòàìè.
Äëÿ ó ...