Download Print this page

RCA COSMAC User Manual page 41

Hide thumbs Also See for COSMAC:

Advertisement

40
User Manual for the
instructions can be used to transfer the M(R(X)) byte to the output display. This logic is suitable if the hex
display is the only output device in the system.
If more than one output device is required, NO through N2 can be decoded to specify up to eight
different output devices or channels. The N3 gate input of Fig. 45 might be replaced by a decoded. N=l
signal. This change would permit the display to be set when 1=6 and N=l (a 61 instruction). Instructions
60, 62, 63, 64, 65, 66, and 67 could then designate other devices or channels to receive the output byte.
Data input. The simplest form of input to the COSMAC microprocessor utilizes one of the four external
flag lines (EF1, EF2, EF3, or EF4). A Iowan a flag line places it in its "true" state. The BRANCH in-
structions 34, 35,36,37, 3C, 3D, 3E, and 3F allow programs to determine the states of these flag lines.
Fig. 46 illustrates one method of using a flag line (EFl in this case) as a binary input.
NOTE: FF SET IRESET
~
LOW
COSMAC
4011
92C5-26478
Fig. 46 - Use of a flag time (EFT) as an input.
Turning on the switch sets EFl low. Turning off the switch sets EFl high. (The flip-flop eliminates
switch bounce.) A COSMAC program can be written to simulate a free-running two-digit decimal counter.
Each two-digit count can be placed in the output display of Fig. 45. The switch in Fig. 46 will start and
stop the counter.
If the switch is in the "ON" position, counting proceeds (00-99). When it is turned off, counting stops
with the current value of the count displayed. Another closure will initiate counting again, started at the
value displayed. A portion of a possible "counter program" is shown below.
M address
M byte
0018
3C
I
18
I
I
I
I
I
I
I
I
I
I
I
I
61
30
I
18
operation
I
Initialize registers
and display
I
BNl
I
I
I
I
Code to perform
count function
I
I
Output 1
BR
comments
Loop here until
switch "ON"
i.e., EFl goes low.
Output the counter byte to display.
Branch to M(0018).
The switch of Fig_ 46 might be replaced by a Teletype® output relay. The opening and closing of this
relay contact represent the bit-serial Teletype character code. A COSMAC program could interpret the
sequential states of the EFl line to provide an extremely simple bit-serial interface.

Advertisement

loading