Ïðîñòåéøàÿ ìèêðî-ÝÂÌ

         

È ÎÁÐÀÁÎÒÊÀ ÄÀÍÍÛÕ


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

 êà÷åñòâå ïðèìåðà ñèñòåìû ñáîðà è îáðàáîòêè äàííûõ ðàññìîòðèì êîíñòðóèðîâàíèå íà áàçå ÏÌ-ÝÂÌ ñ÷åò÷èêà ñëó­÷àéíûõ ñîáûòèé. Ââåäåì â ÏÌ-ÝÂÌ ïðîãðàììó

014 000 006                                                     MVI Â, OOO.Q

014001 000

014002016                                                     MVIC, OOOQ

014 003 000

014 004 026                                                     MVI D, OOOQ

014 005 000

014006315                                   Ml:            CALL SKL

014 007 177

014 010000

014 Oil 170                                                     MOV À, Â

014012074                                                     INR A



014 013 047                                                     DAA

014014323                                                     OUT, OOOQ

014 015 000

014 016 107                                                     MOV Â, À

014017171                                                     MOV À, Ñ

014020316                                                     ACI, 0000

014021 000

014 022 047                                                     DAA

014023323                                                     OUT. 0010

014024  001

014025  117                                                     MOVC, A

014026  172                                                     MOV A, D

014027316                                                     ACI, OOOQ

014030000

014031 047                                                     DAA

014032323                                                     OUT, 002Q

014 033 002

014034127                                                     MOVD. A

014035303                                                     JMP, Ml

014 036 006

014037014

Ïîñëå ââîäà ïðîãðàììû íàæìåì êíîïêè ÑÁÐÎÑ è Ï.  ïîð­òàõ 002, 001, 000 èíäèöèðóþòñÿ ñîîòâåòñòâåííî 006Q - êîä ïåðâîé êîìàíäû ïðîãðàììû è 014Q OOOQ — åå àäðåñ â ïàìÿòè. Òåïåðü áóäåì íàæèìàòü ëþáóþ êíîïêó êëàâèàòóðû (êðîìå êíîïêè ÑÁÐÎÑ) - â ïîðòàõ 002, 001, 000 èíäèöèðóåòñÿ êîëè­÷åñòâî íàæàòèé êíîïêè, âûðàæåííîå â äâîè÷íî-äåñÿòè÷íîì êîäå, íà÷èíàÿ ñ 000 001D è êîí÷àÿ 999 999D. Äëÿ îáíóëåíèÿ ñ÷åò÷èêà äîñòàòî÷íî íàæàòü êíîïêè ÑÁÐÎÑ è Ï. Òàêèì îáðàçîì, ÷èñòî ïðîãðàììíûì ïóòåì íàìè ðåàëèçîâàíà ïðîñòåéøàÿ ñè­ñòåìà ñáîðà è îáðàáîòêè èíôîðìàöèè, ðåãèñòðèðóþùàÿ íàæà­òèÿ êíîïîê, ïîäñ÷èòûâàþùàÿ ýòè íàæàòèÿ è âûäàþùàÿ íà èíäè­êàöèþ â äâîè÷íî-äåñÿòè÷íîé ôîðìå ÷èñëî, ðàâíîå êîëè÷åñòâó íàæàòèé.

 

 



Ñîäåðæàíèå ðàçäåëà