2 / 2 6 / 2 0 0 2 2 : 0 6 P M 2 / 2 6 / 2 0 0 2
7 8
N M I L - 5 0 0 0 A C I A S E R I A L C O M M U N I C A T I O N
B A S I C S A M P L E P R O G R A M
REM Check transmit status: return 1 --> ready for next char
10100 TDSTATUS = XBY(0FFE1H) .AND. 10H : RETURN
REM Check receive status: 1 ==> character received
10200 RDSTATUS = XBY(0FFE1H) .AND. 08H : RETURN
REM Send next character
10300 TDSTATUS = 0
10310 DO
10312 GOSUB 10100
:REM Check transmit status
10314 UNTIL (TDSTATUS > 0)
10316 TDSTATUS = 0
10320 XBY(0FFE0H) = NEXOUT
10390 RETURN
REM Get next character
10400 RDSTATUS = 0
10410 DO
10412 GOSUB 10200
:REM Check receive status
10414 UNTIL (RDSTATUS > 0)
10420 NEXIN = XBY(0FFE0H)
10490 RETURN
REM Debug commands (to use as needed)
REM Report Status Register
20100 STATUS = XBY(0FFE1H)
20110 IF (STATUS .AND. 80H) THEN PRINT " Interrupt has occurred "
20120 IF (STATUS .AND. 40H) THEN PRINT " DSR High (not ready) "
20130 IF (STATUS .AND. 20H) THEN PRINT " DCD High ( not ready) "
20140 IF ((STATUS .AND. 10H) = 0) THEN PRINT " Transmitter not empty "
20145 IF (STATUS .AND. 10H) THEN PRINT " Transmitter empty "
20150 IF (STATUS .AND. 8H) THEN PRINT " Receiver data register full "
20160 IF (STATUS .AND. 4H) THEN PRINT " Overrun has occurred "
20170 IF (STATUS .AND. 2H) THEN PRINT " Framing error detected "
20180 IF (STATUS .AND. 1H) THEN PRINT " Parity error detected "
20185 IF (STATUS = 010H) THEN PRINT " Status is: waiting for data."
20190 RETURN
REM Parity-type report
20200 CMMANDN = CMMAND
20210 IF ((CMMANDN .AND. 20H) <> 0) THEN GOTO 20230
20220 PRINT " Parity disabled, not sent, no checking ": GOTO 20290
20230 PRINT " Parity enabled ",
20240 CMMANDN = CMMANDN .AND. 0C0H
20250 IF (CMMANDN = 0H) THEN PRINT " Odd parity "
20260 IF (CMMANDN = 40H) THEN PRINT " Even parity "
20270 IF (CMMANDN = 80H) THEN PRINT " Mark parity set, no checking "
20280 IF (CMMANDN = 0C0H) THEN PRINT " Space parity set, no checking "
20290 RETURN
REM RTS setting report
20300 CMMANDN = CMMAND
20310 IF((CMMANDN.AND.010H)=0)THEN?" Receiver normal mode ": GOTO 20390
20320 PRINT " Receiver echoes ",
20330 CMMANDN = CMMANDN .AND. 0CH
20340 IF (CMMANDN = 0H) THEN ? " RTS high, xmit disabled "
20350 IF (CMMANDN = 4H) THEN ? " RTS low, xmit int. enabled "
20360 IF (CMMANDN = 8H) THEN ? " RTS low, xmit int. disabled "
20370 IF (CMMANDN <> 0CH) THEN GOTO 20390
20380 PRINT " RTS low, xmit int. disabled, xmit break on TxD "
20390 RETURN
Содержание NMIY-0031
Страница 1: ...2 2 6 2 0 0 2 2 0 6 P M 1 NMIY 0031 Single Board Computer Covers NMIY 0031 V1 0 4 22 96 ...
Страница 2: ...2 2 6 2 0 0 2 2 0 6 P M 2 ...
Страница 6: ...2 2 6 2 0 0 2 2 0 6 P M 6 ...
Страница 8: ...2 2 6 2 0 0 2 2 0 6 P M 8 ...
Страница 14: ...2 2 6 2 0 0 2 2 0 6 P M 1 4 ...
Страница 30: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 0 ...
Страница 32: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 3 2 ...
Страница 50: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 0 ...
Страница 52: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 2 ...
Страница 54: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 4 ...
Страница 56: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 6 ...
Страница 58: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 5 8 ...
Страница 60: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 0 ...
Страница 62: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 2 ...
Страница 68: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 6 8 ...
Страница 70: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 0 ...
Страница 72: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 2 ...
Страница 76: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 7 6 ...
Страница 82: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 2 ...
Страница 84: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 4 ...
Страница 86: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 6 ...
Страница 88: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 8 8 ...
Страница 90: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 9 0 ...
Страница 102: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 2 ...
Страница 108: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 0 8 ...
Страница 110: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 0 ...
Страница 114: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 4 ...
Страница 118: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 1 8 ...
Страница 126: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 6 ...
Страница 128: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 2 8 ...
Страница 134: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 3 4 ...
Страница 148: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 4 8 ...
Страница 150: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 0 ...
Страница 152: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 2 ...
Страница 154: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 4 ...
Страница 156: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 5 6 ...
Страница 168: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 6 8 ...
Страница 170: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 0 ...
Страница 172: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 2 ...
Страница 174: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 4 ...
Страница 178: ...2 2 6 2 0 0 2 2 0 6 P M 2 2 6 2 0 0 2 1 7 8 ...