{"id":6562,"date":"2025-04-08T10:57:31","date_gmt":"2025-04-08T06:57:31","guid":{"rendered":"https:\/\/gameforstreet.ru\/?p=6562"},"modified":"2025-04-08T10:57:31","modified_gmt":"2025-04-08T06:57:31","slug":"migaem-svetodiodom-na-pic16f628-asm","status":"publish","type":"post","link":"https:\/\/xn--c1aaoofgb.xn--p1acf\/?p=6562","title":{"rendered":"\u041c\u0438\u0433\u0430\u0435\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c \u043d\u0430 pic16f628 (asm)"},"content":{"rendered":"<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043c\u0438\u0433\u0430\u0442\u044c \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 2 \u0413\u0446. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 RC-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 4 \u041c\u0413\u0446. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440.<!--more--><\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<p><a href=\"https:\/\/gameforstreet.ru\/wp-content\/uploads\/2025\/04\/628led.gif\"><img loading=\"lazy\" src=\"https:\/\/gameforstreet.ru\/wp-content\/uploads\/2025\/04\/628led.gif\" alt=\"\" width=\"377\" height=\"358\" class=\"alignnone size-full wp-image-6563\" \/><\/a><\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c hex,asm,inc \u0438 \u0434\u0440. \u0434\u043b\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 pic16f628 (\u0442\u0430\u043a\u0436\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 mpasmwin &#8211; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c hex \u0444\u0430\u0439\u043b\u044b \u0438\u0437 asm, \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u0432 Windows, \u0442\u0430\u043a \u0438 \u043d\u0430 Linux \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 wine):<br \/>\n<a href=\"https:\/\/gameforstreet.ru\/wp-content\/uploads\/2025\/04\/pic16f628migaem.zip\" rel=\"noopener noreferrer\" target=\"_blank\">&#8211; \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432 zip \u0430\u0440\u0445\u0438\u0432\u0435.<\/a><br \/>\n<a href=\"https:\/\/gameforstreet.ru\/wp-content\/uploads\/2025\/04\/pic16f628migaem.tar.gz\" rel=\"noopener noreferrer\" target=\"_blank\">&#8211; \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432 tar.gz \u0430\u0440\u0445\u0438\u0432\u0435.<\/a><\/p>\n<p>\u041a\u043e\u0434 \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0435:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n\n        LIST P=16F628, R=DEC    ; Use the PIC16F628 and decimal system \n\n        #include &quot;P16F628.INC&quot;  ; Include header file \n\n        __config  _INTRC_OSC_NOCLKOUT &amp; _LVP_OFF &amp; _WDT_OFF &amp; _PWRTE_ON &amp; _BODEN_ON \n\n        CBLOCK 0x20             ; Declare variable addresses starting at 0x20\n          Loop1,Loop2 \n        ENDC \n; \n; ----------- \n; INITIALIZE \n; ----------- \n; \n        ORG    0x000           ; Program starts at 0x000 \n \n        CLRF   PORTA           ; Initialize port A \n        CLRF   PORTB           ; Initialize port B \n \n        BSF    STATUS,RP0      ; RAM bank 1 \n \n        CLRF   TRISA           ; All pins port A output \n        CLRF   TRISB           ; All pins port B output \n\n        BCF    STATUS,RP0      ; RAM bank 0 \n; \n; ------------------------ \n; FUNCTION OF PORT A PINS \n; ------------------------ \n; \n        MOVLW    7 \n        MOVWF    CMCON         ; Comparators off, all pins digital I\/O \n; \n; ---------- \n; MAIN LOOP \n; ---------- \n; \nMain    BSF     PORTA,2        ; Turn on LED connected to RA2 \n        CALL    delay \n        BCF     PORTA,2        ; Turn off LED connected to RA2 \n        CALL    delay \n        GOTO    Main \n; \n; --------------- \n; DELAY 250 MSEC \n; --------------- \n; \ndelay   MOVLW   250 \n        MOVWF   Loop1 \nOuter   MOVLW   200 \n        MOVWF   Loop2 \nInner   NOP \n        NOP \n        DECFSZ  Loop2,F \n        GOTO    Inner          ; Inner loop = 5 usec. \n        DECFSZ  Loop1,F \n        GOTO    Outer \n        RETURN \n\n        END\n\n<\/pre>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 1: <\/p>\n<p>RA4 (\u043a\u043e\u043d\u0442\u0430\u043a\u0442 3) \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0441\u0442\u043e\u043a. \u041e\u043d \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0446\u0435\u043f\u044c. \u0415\u0441\u043b\u0438 \u043a \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043a\u0430\u0442\u043e\u0434 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043a \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0443 3, \u0430\u043d\u043e\u0434 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u043a \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0443, \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u043a +5 \u0412.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 2:<\/p>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 _INTRC_OSC_NOCLKOUT PIC \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 RC-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 4 \u041c\u0413\u0446. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e RA6 \u0438 RA7 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<p>\u0412 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 CMCON \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 7 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432 \u043f\u043e\u0440\u0442\u0430 A, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043a\u0430\u043a \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0432\u0445\u043e\u0434\u044b\/\u0432\u044b\u0445\u043e\u0434\u044b.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u0431\u0440\u043e\u0441\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 4 (RA5) \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430, \u0430 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u043a\u0430\u043a \u0432\u0445\u043e\u0434\u043d\u043e\u0439. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0451\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f _CLRE_OFF \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 _config.<\/p>\n<p>\u0412\u0441\u0435 \u043f\u043e\u0440\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c, \u0437\u0430\u043c\u0435\u043d\u0438\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u043f\u0435\u0442\u043b\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n;\n; ----------\n; MAIN LOOP\n; ----------\n; Apply 2 Hz to all ports\nMain MOVLW b'01010101'\nMOVWF portA\nMOVWF portB\nCALL delay\nMOVLW b'10101010'\nMOVWF portA\nMOVWF portB\nCALL delay\nGOTO Main\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u043c\u0438\u0433\u0430\u0442\u044c \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 2 \u0413\u0446. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 RC-\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 4 \u041c\u0413\u0446. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440.<\/p>\n","protected":false},"author":2,"featured_media":6563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[103],"tags":[],"_links":{"self":[{"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/posts\/6562"}],"collection":[{"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6562"}],"version-history":[{"count":0,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/posts\/6562\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=\/wp\/v2\/media\/6563"}],"wp:attachment":[{"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xn--c1aaoofgb.xn--p1acf\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}