background image

RS-232 Handler Functions and Tables

 

 

This section contains a list of all input/output and XIO calls to the RS-232 "R:" handler of the MIO. 
Note that IOCB is an input/output channel number that indicates what OPEN device shall receive or 
provide data. For most XIO calls, you may use any legal IOCB number as long as it is NOT open to 
any other device. From Atari BASIC, you may use IOCB numbers 1 through 7 (0 is reserved for 
editing "E:" I/O).

  

Note that IOCB #7 is used for the BASIC LPRINT statement and IOCB #6 is used for graphics mode 
functions from BASIC. Also, if using SpartaDOS, IOCB #4 and IOCB #5 are used while doing output 
and input redirection respectively (via the DOS PRINT command and batch files).

 

All the syntaxes use just "R:" for the device name since there is only one RS-232 port on the MIO. In 
fact, if you do use a port number (ex. "R2:"), it is simply ignored and treated the same as "R:".

 

All the function formats are given in their Atari BASIC form. If using assembly language or some 
other high level language, refer to the language manual for its equivalent form.

 

Opening the RS-232 Port

 

Syntax

 

OPEN #IOCB,Aux1,0,"R:"

 

Remarks 

This function opens a channel to the RS-232 port in pseudo "non-concurrent" mode. To remain 
compatible with the 850 and P:R: Connection, the MIO has a flag indicating whether an XIO 40 (set 
concurrent mode) has been performed since the last OPEN command. If it has not, then the 
STATUS command returns the state of the handshake lines, whereas if in concurrent mode, the 
STATUS command returns the number of characters in the input and output buffers.

 

Aux1 contains the I/O direction bits — 4 for input only, 8 for output only, and 12 for both input and 
output (which is equivalent to 13 of the 850 interface). Many XIO calls do not require that you open 
an RS-232 channel first, however, it is generally a good practice to open the channel first. Care 
should be taken when setting the state of the handshake lines; if you set DTR false, the transmitter 
and receiver are disabled. Therefore, you must re-enable them by setting DTR true before 
continuing with normal operation.

 

When the channel is opened, both the input and output buffers are cleared. Also, the RTS and DTR 
handshake lines are set true (to the ready state).

 

Closing the RS-232 Port

 

Syntax

 

CLOSE #IOCB

 

Remarks

 

This statement closes the IOCB connected to the RS-232 port. This simply shuts down the IOCB; 
the RS-232 port remains untouched except that the system waits until all data in the output buffer 
has been transmitted. 

 

MIO Service Manual

Page 65

Содержание Mio

Страница 1: ......

Страница 2: ...5 27C128 EPROM 30 U16 U20 74LS73A 31 U17 MC1489P 34 U18 LM3086 35 U19 74HC4046 36 U22 74LS139 43 U23 74LS158 45 U27 U48 74LS374 47 U28 74LS240 49 U47 U50 RESISTOR NETWORKS 50 DRAM Timing 53 Theory Signals 54 Theory Read Cycle 55 Theory Write Cycle 56 Theory Refresh 57 Programming Information 58 Hardware Description 58 Register Selection Table 59 ACIA Command Register 60 ACIA Control Register 61 RA...

Страница 3: ...MIO Service Manual Page 2 ...

Страница 4: ...MIO Service Manual Page 3 ...

Страница 5: ...MIO Service Manual Page 4 ...

Страница 6: ...MIO Service Manual Page 5 ...

Страница 7: ...MIO Service Manual Page 6 ...

Страница 8: ...MIO Service Manual Page 7 ...

Страница 9: ...ICO 143 S8A T 0 08 DIP SOCKET 16 PIN 10 517 ICO 163 S8A T 0 11 DIP SOCKET 20 PIN 9 517 ICO 203 S8A T 0 11 DIP SOCKET 28 PIN 2 517 ICO 286 S8A T 0 15 25x2 Pin Header Right angle 1 A32706 25 ND 1 74 25x2 Pin header 4 A32707 25 ND 2 12 Female DB9 connector 1 J8 152 3409 0 73 Male DB9 Connector 1 J3 152 3309 0 77 Female DB25 connector 1 J2 152 3425 1 19 Power connector 1 J6 CP 102AH ND 0 36 Power swit...

Страница 10: ...U1 74LS20 DUAL 4 INPUT NAND GATE MIO Service Manual Page 9 ...

Страница 11: ...U2 U12 U24 74LS175 QUAD D FLIP FLOP MIO Service Manual Page 10 ...

Страница 12: ...MIO Service Manual Page 11 ...

Страница 13: ...U3 U4 74LS138 3 TO 8 LINE DECODER MIO Service Manual Page 12 ...

Страница 14: ...MIO Service Manual Page 13 ...

Страница 15: ...U5 7407 HEX BUFFER DRIVER MIO Service Manual Page 14 ...

Страница 16: ...U6 6551 ASYNCHRONOUS COMMUNICATION INTERFACE ADAPTER ACIA MIO Service Manual Page 15 ...

Страница 17: ...MIO Service Manual Page 16 ...

Страница 18: ...MIO Service Manual Page 17 ...

Страница 19: ...MIO Service Manual Page 18 ...

Страница 20: ...MIO Service Manual Page 19 ...

Страница 21: ...MIO Service Manual Page 20 ...

Страница 22: ...MIO Service Manual Page 21 ...

Страница 23: ...U7 U10 74LS04 HEX INVERTER MIO Service Manual Page 22 ...

Страница 24: ...U8 74LS02 QUAD 2 INPUT NOR GATE MIO Service Manual Page 23 ...

Страница 25: ...U9 U25 74LS93 4 BIT BINARY COUNTER MIO Service Manual Page 24 ...

Страница 26: ...MIO Service Manual Page 25 ...

Страница 27: ...MIO Service Manual Page 26 ...

Страница 28: ...U11 74LS10 TRIPLE 3 INPUT NAND GATE MIO Service Manual Page 27 ...

Страница 29: ...U13 U21 U67 U69 74LS00 QUAD 2 INPUT NAND GATE MIO Service Manual Page 28 ...

Страница 30: ...U14 U26 U29 U49 U68 74LS244 OCTAL BUFFER LINE DRIVER WITH TRI STATE OUTPUTS MIO Service Manual Page 29 ...

Страница 31: ...U15 27C128 16K x 8 EPROM MIO Service Manual Page 30 ...

Страница 32: ...U16 U20 74LS73A DUAL J K FLIP FLOP WITH CLEAR MIO Service Manual Page 31 ...

Страница 33: ...MIO Service Manual Page 32 ...

Страница 34: ...MIO Service Manual Page 33 ...

Страница 35: ...U17 MC1489P QUAD LINE RECIEVER MIO Service Manual Page 34 ...

Страница 36: ...U18 LM3086 TRANSISTOR ARRAY MIO Service Manual Page 35 ...

Страница 37: ...U19 74HC4046 PHASE LOCKED LOOP MIO Service Manual Page 36 ...

Страница 38: ...MIO Service Manual Page 37 ...

Страница 39: ...MIO Service Manual Page 38 ...

Страница 40: ...MIO Service Manual Page 39 ...

Страница 41: ...MIO Service Manual Page 40 ...

Страница 42: ...MIO Service Manual Page 41 ...

Страница 43: ...MIO Service Manual Page 42 ...

Страница 44: ...U22 74LS139 DUAL 1 OF 4 DECODER DEMULTIPLEXER MIO Service Manual Page 43 ...

Страница 45: ...MIO Service Manual Page 44 ...

Страница 46: ...U23 74LS158 QUAD 2 INPUT MULTIPLEXER MIO Service Manual Page 45 ...

Страница 47: ...MIO Service Manual Page 46 ...

Страница 48: ...U27 U48 74LS374 OCTAL D TYPE FLIP FLOP POSITIVE EDGE TRIGGER TRI STATE MIO Service Manual Page 47 ...

Страница 49: ...MIO Service Manual Page 48 ...

Страница 50: ...U28 74LS240 OCTAL BUFFER LINE DRIVER WITH 3 STATE OUTPUTS MIO Service Manual Page 49 ...

Страница 51: ...U47 MDP1603 330G AND U50 MDP1605 221 331G DIP PACKAGE RESISTOR NETWORKS MIO Service Manual Page 50 ...

Страница 52: ...MIO Service Manual Page 51 ...

Страница 53: ...MIO Service Manual Page 52 ...

Страница 54: ...MIO Service Manual Page 53 ...

Страница 55: ...MIO Service Manual Page 54 ...

Страница 56: ...MIO Service Manual Page 55 ...

Страница 57: ...MIO Service Manual Page 56 ...

Страница 58: ...MIO Service Manual Page 57 ...

Страница 59: ... control lines are normally all ones port voltages are 5 which represents a logic false on the bus For more information on SASI SCSI bus protocol refer to the Adaptec ACB 4000 Series User s Manual the XEBEC S1410A disk controller document the Seagate ST225N manual or any other device manual employing these protocols The ACK REQ handshake cycle is performed by the MIO hardware Whenever the data D1E...

Страница 60: ...nly 1 bit allowed set at a time B 2 1 Disk Interface ROM B 3 1 Seg 2 of setup MENU B 4 1 R P Handler ROM B 5 1 Seg 1 of setup MENU All bits 0 disable the ROM IRQ sense bits Misc inputs B 0 RS 232 DCD line B 1 RS 232 DSR line B 2 RS 232 CTS line B 3 Printer BUSY IRQ B 4 MIO IRQ from 6551 or Printer BUSY IRQ D1C0 Write ACIA transmit register Read ACIA receive register D1C1 Perform a programmed RESET...

Страница 61: ...e 1 Receiver echo mode bits 2 and 3 must be zero for receiver echo mode RTS will be true Bit 3 2 Transmitter Interrupt Control TIC 3 2 0 0 RTS false transmitter disabled 0 1 RTS true transmit interrupt enabled 1 0 RTS true transmit interrupt disabled 1 1 RTS true transmit interrupt disabled and transmit break on TxD Bit 1 Receiver Interrupt Request Disabled IRD 0 IRQ enabled receiver 1 IRQ disable...

Страница 62: ... 6 5 Number of bits 0 0 8 0 1 7 1 0 6 1 0 5 Bit 4 Receiver Clock Source RCS 0 External receiver clock non functional on MIO 1 Baud Rate SBR Bits 3 0 Selected Baud Rate SBR 3 2 1 0 Baud Rate 0 0 0 0 16 x RxC Not usable by MIO 0 0 0 1 50 0 0 1 0 75 0 0 1 1 110 0 1 0 0 135 0 1 0 1 150 0 1 1 0 300 0 1 1 1 600 1 0 0 0 1200 1 0 0 1 1800 1 0 1 0 2400 1 0 1 1 3600 1 1 0 0 4800 1 1 0 1 7200 1 1 1 0 9600 1 ...

Страница 63: ...the ACIA in which case D1C1 bit 7 should be set Note that the parallel device IRQ mask PDIMSK at 249 is set to 10 by the MIO RAM This is because there is only one interrupt handler which supports all possible MIO interrupts in the ROM In fact the system would crash if the OS tried to enter any of the other ROM banks to service the IRQ Accessing the ROM The ROM on the MIO contains all the software ...

Страница 64: ...nfigure D610 DRDATA 64 This contains an array of 8 drive config records each 8 bytes long Records are 0 First physical block address sector number of logical device MSB first 3 Last 1 physical block address sector number of logical device MSB first 6 B 2 0 SCSI SASI ID if hard disk drive number if floppy B 5 1 if floppy drive reassign B 6 1 if RAM drive B 7 1 if Hard drive if B 7 5 0 then ignore 7...

Страница 65: ...r memory page number LSB MSB D6C5 CPROFFS 1 Printer queue entry page offset D6C6 PROFFS 1 Printer queue exit page offset D6C7 BADBUFF 1 If 255 this indicates that the queue has wrapped thus repeat copies are invalid D6C8 PRIRQ 1 If 128 then parallel IRQ is enabled This byte gets copied to D6E2 when ROM exited D6CA PRPAUSE 1 If 0 then the printer spooler is paused D6CB PCOPYT 1 Number repeat copies...

Страница 66: ...e RS 232 port in pseudo non concurrent mode To remain compatible with the 850 and P R Connection the MIO has a flag indicating whether an XIO 40 set concurrent mode has been performed since the last OPEN command If it has not then the STATUS command returns the state of the handshake lines whereas if in concurrent mode the STATUS command returns the number of characters in the input and output buf...

Страница 67: ...e as a normal PRINT statement except that the IOCB precedes the expression Note that the IOCB must be opened for write or read write mode 8 or 12 but whether in concurrent mode or not has no effect on GET INPUT statement operation Refer to your BASIC reference manual for more information on these statements Reading the Port Status Syntax STATUS IOCB DUMMY FLAGS PEEK 746 REM Error bits relating to ...

Страница 68: ...imply copies of the next highest bit In the 850 Interface these bits would indicate a history i e not always ready since last STATUS Forcing Early Transmission of Output Blocks Syntax XIO 32 IOCB 0 0 R Remarks This function causes all the buffered data in the computer to be transmitted through the RS 232 port This is used when the user wants to make sure that all data is transmitted before perform...

Страница 69: ...u must add the value representing the desired baud rate to the code 0 or 128 for the desired number of stop bits per word Note that the word size is always 8 bits plus 1 or 2 stop bits the MIO R handler does not support smaller word sizes as did the Atari 850 interface The missing baud rates are available through the ACIA on the MIO but are not supported by the R handler since they are never used ...

Страница 70: ...ault FEEDS 64 Append LF after CR translation from EOL Setting Concurrent Mode Syntax XIO 40 IOCB 0 0 R Remarks This function simulates the Start concurrent mode I O of the P R Connection and Atari 850 This is needed because of the dual nature of the STATUS command When in concurrent mode the statement returns the size of the data buffers whereas when in block mode the statement returns the state o...

Страница 71: ...the special needs of your particular installation Printer Cable Connections 36 pin centronics male DB25P 1 2 1 Data Strobe 2 D0 3 4 3 D1 4 D2 5 6 5 D3 6 D4 7 8 7 D5 8 D6 16 32 18 25 Gnd 15 Fault 11 9 11 Busy 9 D7 Frame to the shield wire No connection to shield MODEM Cable Connections DB25P DB9P 20 8 4 DTR 1 CRX 2 3 3 XMT 2 RCV 7 6 5 GND 6 DSR 4 5 7 RTS 8 CTS Frame to the shield wire No connection...

Страница 72: ...s a DCE device not DTE then XMT would connect to XMT and RCV to RCV DTE Serial Printer Cable Connections DB25P DB9P 6 DSR 4 RTS 4 DTR 1 CRX 3 RCV 2 XMT 3 XMT 2 RCV 7 GND 20 DTR 5 GND 6 DSR 5 8 CTS CD 14 FAULT 7 RTS 8 CTS Frame to the shield wire No connection to shield Null MODEM Cable Connections This will allow transfer of files between an MIO serial port and an IBM PC or Atari ST without using ...

Страница 73: ...I ST506 412 ST506 412 RLL certified Iomega Alpha 10H Beta xxx SCSI SCSI cartridge drive 10Mb cartridge drive xxMb Rodime RO650 RO652 SCSI SCSI includes drive 10Mb includes drive 20Mb Seagate ST225N SCSI includes drive 20Mb Western Digital WD1002 SHD SASI ST506 412 XEBEC 1410 1410A SASI SASI ST506 412 ST506 412 MIO Service Manual Page 72 ...

Отзывы: