Last modified by Max on 2025/03/02 15:18

From version 2.46
edited by Max
on 2025/02/25 15:07
Change comment: (Autosaved)
To version 2.47
edited by Max
on 2025/02/25 15:12
Change comment: (Autosaved)

Summary

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-11
719 +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-11
742 +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 часы как источник заполнения буфера timestamp
759 +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 - чтение данных часов из автономных часов RTC
767 -; 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, данная команда отдает на шину содержимое буфера timestamp
780 +Command code 032, this command sends the contents of the timestamp buffer to the bus
783 783  
784 784  {{code language="assembler"}}
785 785  ; работа с часами