Changes for page API контроллеров AZ®
Last modified by Max on 2025/03/02 15:18
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -711,17 +711,15 @@ 711 711 712 712 = Block of commands for working with RTC and NTP = 713 713 714 - ВконтроллереAZ®есть2источникаполучениядаты-времени,первыйэтоRTCвстроенныйвSTM32,второйэточасывстекеTCP/IP.ЧасыRTCработаютавтономноприналичииустановленнойбатарейки2032.ЧасывстекеTCP/IPустанавливаютсянаоснованииданныхсNTP-сервера.714 +The AZ® controller has 2 sources of date-time, the first is the RTC built into the STM32, the second is the clock in the TCP/IP stack. The RTC clock works autonomously with a 2032 battery installed. The clock in the TCP/IP stack is set based on data from the NTP server. 715 715 716 716 717 -== Форматбуфераtimestamp (доступен по чтению) ==717 +== Buffer format timestamp (readable) == 718 718 719 -API контроллерасразуготовитвремявнескольких форматах,дабыегобылоудобноприменитьнасторонеPDP-11719 +The controller API immediately prepares time in several formats, so that it can be conveniently used on the PDP-11 side 720 720 721 721 {{info}} 722 -формат буфера даты-времени 723 -offset в восьмеричной системе - те слова 724 -формат буфера даты-времени 722 +datetime buffer format octal offset - those words datetime buffer format 725 725 \\[0]=rtc_rt11date(); 726 726 [2]=rt11 time 50Hz big word; 727 727 [4]=rt11 time 50Hz little word; ... ... @@ -739,47 +739,47 @@ 739 739 {{/info}} 740 740 741 741 742 -== Формат буфераSimpleIN (призаписи) ==740 +== SimpleIN buffer format (when writing) == 743 743 744 - форматмаксимальноупрощен,дляработысостороныPDP-11742 +the format is simplified as much as possible, for work with PDP-11 745 745 746 746 {{info}} 747 -offset ввосьмеричнойсистеме-теслова745 +offset in octal - those words 748 748 749 -[0]=year год,младшиедвецифры-те22ане2022(!)750 -[2]=month; месяц751 -[4]=day; день752 -[6]=wday; деньнедели=0неустановлен, 1-понедельник2 -вторникитд753 -[10]=hour; час754 -[12]=min; минута755 -[14]=sec; секунда747 +[0]=year, the lower two digits are 22 and not 2022(!) 748 +[2]=month; month 749 +[4]=day; day 750 +[6]=wday; day of the week =0 not set, 1 - Monday 2 - Tuesday etc. 751 +[10]=hour; hour 752 +[12]=min; minute 753 +[14]=sec; second 756 756 {{/info}} 757 757 758 758 759 -== **031:ПолучитьвремяизRTCвбуферtimestamp**==757 +== 031: Get time from RTC to timestamp buffer == 760 760 761 - Кодкоманды031,даннаякомандаиспользуетRTCчасыкакисточникзаполнениябуфераtimestamp759 +Command code 031, this command uses RTC clock as a source of filling the timestamp buffer 762 762 763 - Примерпрограммы:761 +Example program: 764 764 765 765 {{code language="assembler"}} 766 -; trap 61 - чтениеданныхчасовизавтономныхчасовRTC767 -; R3 - адресбуферакуданадосчитать768 -; результатвR3адрес,еслиуспешно. R3=0если ошибка764 +; trap 61 - reading clock data from autonomous RTC clock 765 +; R3 - buffer address where to read 766 +; result in R3 address if successful. R3=0 if error 769 769 GetDateFromRTC: push R0 770 770 push R1 771 771 push R2 772 - call AZreset; сбросим770 + call AZreset; reset 773 773 tst R1 774 774 bne G60ERR 775 775 MOV #AZ$CSR,R1 776 776 mov #31,(R1) 777 - br G60; идемтудаткдальшекододинаковый775 + br G60; let's go there because further code is the same 778 778 {{/code}} 779 779 780 -== **032:Получитьвремяизбуфераtimestamp**==778 +== 032: Get time from timestamp buffer == 781 781 782 - Кодкоманды032,даннаякомандаотдаетнашинусодержимоебуфераtimestamp780 +Command code 032, this command sends the contents of the timestamp buffer to the bus 783 783 784 784 {{code language="assembler"}} 785 785 ; работа с часами