Quatech MPA-200/300, RS-422/485 user manual Accessing the registers

Page 12

3.1Accessing the registers

The mode of communication desired is established and monitored through the bit values of the internal read and write registers. The register set of the SCC includes 16 write registers and 9 read registers. These registers only occupy four address locations, which start at the MPA-200's physical base address that is configured via the on board switches. This and all other addresses are referenced from this base address in the form Base + Offset. An example of this is Base + 1 for the SCC Control Port, Channel A.

There are two register locations per SCC channel, a data port and a control port . Accessing the internal SCC registers is a two step process that requires loading a register pointer to perform the addressing to the correct data register. The first step is to write to the control port the operation and address for the appropriate channel. The second step is to either read data from or write data to the control port. The only exception to this rule is when accessing the transmit and receive data buffers. These registers can be accessed with the two step process described or with a single read or write to the data port. The following examples illustrate how to access the internal registers of the SCC. Also, Table 2 SCC read register description describes the read registers and Table 3 SCC write register descrip- tion describes the write registers for each channel.

The MPA-200 has been designed to assure that all back to back access timing requirements of the SCC are met without the need for any software timing control. The standard of adding jmp $+2 between IO port accesses is not required when accessing the MPA-200.

Example 1: Enabling the transmitter on channel A.

mov

dx,base

; load base address

add

dx,ContA

; add control reg A offset

mov

al,05h

; write the register number

out

dx,al

;

mov

al,08h

; write the data to the register

out

dx,al

 

Example 2: Monitoring the status of the transmit and receive buffers in RR0 of Channel A. Register 0 is addressed by default if no register number is written to WR0

mov

dx,base

; load base address

add

dx,ContA

; add control reg A offset

in

al,dx

; read the status

Quatech Inc., MPA-200/300 Manual

6

Image 12
Contents MPA-200/300 QUATECH, INCPage Warranty Information Page Compliances Electromagnetic Emissions Table of Contents Quatech Inc., MPA-200/300 Manual Introduction MPA-200 board drawing Hardware Installation IRQ DMA/DRQSCC General Information Accessing the registers RR0 RR1RR2 RR3WR0 WR1WR2 WR3Baud Rate Generator Programming SCC Data Encoding Methods Jumper Block Configurations J4 Interrupt ConfigurationJ5 & J6 Interrupt Level Selection IRQ3 IRQ4 IRQ5 IRQ6 IRQ7IRQ10 IRQ11 IRQ12 IRQ14 IRQ15 J10 Transmit DMA Channel SelectionJ11 Receive DMA Channel Selection J7 Line Driver Control SelectionJ8 Synca to Rlen control Synca Rlen OUTAddressing Base Address = 3F8HPage Interrupts Direct Memory Access Page Reqa Configuration Register D1 -RXSRC, Receive DMA Source D0 -TXSRC, Transmit DMA SourceCommunications Register TM ST Llen Rlen Rcken Tcken Rxden TxdenD1 -RECEIVER Enable D0 -TRANSMITTER EnableDTE / DCE Configuration DTE Configuration Rrclk Rtclk Trxca Tclk TtclkDCE Configuration DCE Clock Configuration External Connections DTR DTR/REQA DSR Dcda +RRCLK Trxc Test Mode CTS Ctsa +DSR DcdaTest Mode Null-Modem Cables Circuit AB Signal Ground Connector Notation Dgnd Circuit CC Data SET Ready DSR Connector Notation +DSR,-DSRConnector Notation +TXD,-TXD Connector Notation +RXD,-RXDConnector Notation +RTCLK,-RTCLK Connector Notation +RRCLK,-RRCLKCircuit CA Request to Send RTS Connector Notation +RTS,-RTS Circuit CB Clear to Send CTS Connector Notation +CTS,-CTSCircuit CD DTE Ready DTR Connector Notation +DTR,-DTR Circuit LL Local Loopback LL Connector Notation LlbkCircuit RL Remote Loopback RL Connector Notation Rlbk Circuit TM Test Mode TM Connector Notation Test Mode Specifications MPA-200/300 Version March