{"id":635,"date":"2021-09-20T13:08:32","date_gmt":"2021-09-20T11:08:32","guid":{"rendered":"https:\/\/automatico.freevar.com\/?page_id=635"},"modified":"2021-09-28T11:51:22","modified_gmt":"2021-09-28T09:51:22","slug":"bbcbasic-z80-mbc2","status":"publish","type":"page","link":"https:\/\/automatico.freevar.com\/index.php\/cp-m-80-2\/bbc-basic\/bbcbasic-z80-mbc2\/","title":{"rendered":"BBCBasic &#8211; Z80-MBC2"},"content":{"rendered":"<p><span style=\"font-size: 14pt;\"><span class=\"goog-text-highlight\">Here you can see the adaptation <\/span><span class=\"goog-text-highlight\">of the test program for the RTC of the z80-MBC2 mother board in BBCBasic. <\/span>The data from the RTC is obtained through the MCP23017 GPIO.\u00a0<\/span><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n10 CLS\r\n20 REM PUT 1, numero -&gt; accende la periferica numero\r\n30 REM PUT 0, 1 ON\r\n40 REM PUT 0, 0 OFF\r\n50 REM if GET(0)=1 high input\r\n60 REM if GET(0)=0 low input\r\n70 PUT 1,132\r\n80 SECONDO=GET(0)\r\n90 MINUTO=GET(0)\r\n100 HORA=GET(0)\r\n110 GIORNO=GET(0)\r\n120 MESE=GET(0)\r\n130 ANNO=GET(0)\r\n140 TEMP=GET(0)\r\n160 ANNO = ANNO + 2000\r\n170 SECONDO$ = STR$(SECONDO): SECONDO$ = RIGHT$(&quot;00&quot;+RIGHT$(SECONDO$,LEN(SECONDO$)),2)\r\n180 MINUTO$ = STR$(MINUTO): MINUTO$ = RIGHT$(&quot;00&quot;+RIGHT$(MINUTO$,LEN(MINUTO$)),2)\r\n190 HORA$ = STR$(HORA): HORA$ = RIGHT$(&quot;00&quot;+RIGHT$(HORA$,LEN(HORA$)),2)\r\n200 GIORNO$ = STR$(GIORNO): GIORNO$ = RIGHT$(&quot;00&quot; + RIGHT$(GIORNO$, LEN(GIORNO$)), 2)\r\n210 MESE$ = STR$(MESE): MESE$ = RIGHT$(&quot;00&quot; + RIGHT$(MESE$, LEN(MESE$)), 2 )\r\n220 ANNO$ = STR$(ANNO): ANNO$ = RIGHT$(&quot;0000&quot; + RIGHT$(ANNO$, LEN(ANNO$)), 4)\r\n230 PRINT CHR$(27);&quot;&#x5B;0;0H&quot;;GIORNO$;&quot;\/&quot;;MESE$;&quot;\/&quot;;ANNO$;&quot; &quot;;HORA$;&quot;:&quot;; MINUTO$;&quot;:&quot;;SECONDO$\r\n240 PRINT TEMP;&quot;C&quot;\r\n250 PUT 1,128\r\n260 IF GET(0) = 1 THEN END\r\n270 GOTO 70\r\n<\/pre>\n<p><span style=\"font-size: 14pt;\">For an explanation of RTC I \/ O see at<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"> <a href=\"https:\/\/automatico.freevar.com\/index.php\/z80-mbc2\/mcp-23017-gpio\/\">https:\/\/automatico.freevar.com\/index.php\/z80-mbc2\/mcp-23017-gpio\/<\/a><\/span><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_635\" class=\"pvc_stats all  \" data-element-id=\"635\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/automatico.freevar.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here you can see the adaptation of the test program for the RTC of the z80-MBC2 mother board in BBCBasic. The data from the RTC is obtained through the MCP23017 GPIO.\u00a0 10 CLS 20 REM PUT 1, numero -&gt; accende la periferica numero 30 REM PUT 0, 1 ON 40 REM PUT 0, 0 OFF [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_635\" class=\"pvc_stats all  \" data-element-id=\"635\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/automatico.freevar.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"parent":605,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-635","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/635"}],"collection":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/comments?post=635"}],"version-history":[{"count":9,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/635\/revisions"}],"predecessor-version":[{"id":751,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/635\/revisions\/751"}],"up":[{"embeddable":true,"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/pages\/605"}],"wp:attachment":[{"href":"https:\/\/automatico.freevar.com\/index.php\/wp-json\/wp\/v2\/media?parent=635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}