Download Print this page

RCA COSMAC User Manual page 43

Hide thumbs Also See for COSMAC:

Advertisement

42
1---~.2!.N£O.:.-3~_~
4 TO 16
DECODE
COS MAC
SCO
TPB
N
~
F: STORE DATA BYTE FROM
SELECTED DEVICE
N~
E: STORE STATUS BYTE FROM
SELECTED
DEVICE
N~
2: TRANSFER DATA BYTE TO
SELECTED DEVICE
N~I:TRANFER
CONTROL BYTE TO
SELECTED DEVICE
N
=O:SELECT DEVIC E
STROBE
8-BIT I/O
DEV ICE
SELECT
REGISTER
Fig.
48 -
Two-level I/O system.
User Manual for the
SELECT DEVICE No256
SELECT DEVICE No.255
SELECT DEVICE No.2
SELECT DEVICE No I
92CM-26475
codes can be used to start or stop electromechanical devices, set up specific modes of operations, etc. When
the 8-bit I/O device select register specifies an output device, execution of a 62 instruction will cause an
output data byte transfer to selected device. After an input device is selected, a 6F instruction could be
executed to store an input byte in memory. Execution of a 6E instruction is used to obtain a status code
byte from a selected device. Instructions 63,64,65,66,67,68, 6A, 6B, 6C, and 60 could be used to con-
trol other system functions, either directly (ignoring device selection) or under control of the device select
register.
A flag line can be shared between several I/O devices by treating it as a bus. Individual device conditions
would be gated to the flag bus only when that device is selected.
The above examples indicate only a few of the ways in which I/O instructions can be implemented. The
I/O interface line can be used in a great variety of ways,limited only by the ingenuity of the system designer.
DMA Operation
The I/O examples described above require that a program periodically sample I/O device status. These
techniques also require several instruction executions for each I/O byte transfer. In many cases it is desirable
to have I/O byte transfers occur without burdening the program or to transfer data at higher rates than
possible with programmed I/O. A built-in direct-memory-access (DMA) facility permits high-speed I/O byte
transfer operations independent of normal program execution.
During DMA operation, R(O) is used as the memory address register and should not be used for other
purposes. Two lines, DMA-IN and DMA-OUT, are used to request DMA byte transfer to and from the
memory. Also, a specific code is provided on the state code lines (SCO, SC1) to indicate a DMA cycle (S2).
DMA-IN ACTION
BUS ..... M(R(O)); R(O)+l
DMA-OUT ACTION
M(R(O)) ..... BUS; R(O)+l

Advertisement

loading