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
-
... ... @@ -657,18 +657,18 @@ 657 657 Example program 658 658 659 659 {{code language="assembler"}} 660 -AZ$CSR регистркомандисостояния(CSR)661 -AZ$DR регистрданных(DR)660 +AZ$CSR = 177220; Command and Status Register (CSR) 661 +AZ$DR = 177222; Data Register (DR) 662 662 663 663 664 -; trap 50 - cбросAZ664 +; trap 50 - reset AZ 665 665 ; результат в R1 =0 ok 666 666 AZreset: MOV #AZ$CSR,R1 667 -1$: CLR (R1); Пошлемкоманду"Сброс"668 - TSTB (R1); Проверимготовностьконтроллера669 - BPL 1$; Еслинеготов,сбрасываемеще670 - разипроверяемснова671 - TST (R1); Проверимнаошибку,667 +1$: CLR (R1); Send the "Reset" command 668 + TSTB (R1); Check the controller readiness 669 + BPL 1$; If not ready, reset again 670 +; once and check again 671 + TST (R1); Check for an error, 672 672 BMI 0ERR$ 673 673 CLR R1 674 674 return ... ... @@ -676,27 +676,27 @@ 676 676 COM R1 677 677 return 678 678 679 -; trap 55 - записьэнергонезависимойпамятиизбуферасадресаADREEPROMMEM в блок 1 EEPROM679 +; trap 55 - write non-volatile memory from the buffer at address ADREEPROMMEM в блок 1 EEPROM 680 680 WriteEEPROM: push R1 681 681 push R2 682 682 push R3 683 - call AZreset; сбросим683 + call AZreset; reset 684 684 tst R1 685 685 bne 0ERR$ 686 686 687 687 MOV #AZ$CSR,R1 688 - mov #23,(R1); командуемчтобудемписатьданныевбуфер689 -0$: TSTB (R1); проверяемрезультатвыполнения690 - BPL 0$; ждем691 - TST (R1)+; инкрементируем688 + mov #23,(R1);command that we will write data to the buffer 689 +0$: TSTB (R1); check the result of executio 690 + BPL 0$; wait 691 + TST (R1)+; increment 692 692 mov #ADREEPROMMEM+2,R3 693 - mov #255.,R2; пишем255.слов;первоесловопропускаем-результатчтения694 -1$: mov (R3)+,(R1); отдаемвконтроллер693 + mov #255.,R2; write 255. words; skip the first word - the result of reading 694 +1$: mov (R3)+,(R1); send to the controller 695 695 sob R2,1$ 696 - tst -(R1); декрементируем697 - mov #24,(R1); записатьизбуферавблок1энергонезависимойпамяти698 -2$: TSTB (R1); проверяемрезультатвыполнения699 - BPL 2$; ждем696 + tst -(R1); decrement 697 + mov #24,(R1); write from the buffer to block 1 of non-volatile memory 698 +2$: TSTB (R1); check the result of execution 699 + BPL 2$; we are waiting 700 700 br 0END$ 701 701 0ERR$: CLR R3 702 702 0END$: pop R3 ... ... @@ -705,23 +705,21 @@ 705 705 return 706 706 {{/code}} 707 707 708 -** Обращаювнимание**,призаписи,буферидетсразусданными,тенетпервогословасостатусом.708 +**Please note** that when recording, the buffer immediately comes with the data, i.e. there is no first word with the statu 709 709 710 710 711 711 712 -= БлоккоманддляработысRTCиNTP =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 ; работа с часами