Professional Documents
Culture Documents
TECHNICAL MANUAL
for
SUPER QUAD
1
TABLE OF CONTENTS
Page
··............
6.6 Jumper P - VIO / para1led bit D0 16
6.7 Jumper N - VII / paralled bit 01 17
6.8
6.9
Jumper M - VI2 / paralled bit D2
Jumper K - VI3 / paralled bit D3
·. . . .. .
·......
18
18
6.10 Jumper J - VI4 / paralled bit D4 ·...... 18
2
6.13 Jumper F - VI7 / paralled bit D7 •••••.• 19
6.14 Jumper R - 2716 / 2732 •••••••••••••••.• 19
6.15 Jumper S - Floppy connector ••••••••••.•
6.16 Jumper T - Memory Write Signal ••••••••• 20
6.17 Jumper layout ••••••••••••••••••••••••••• AA
3
1.1 The Floppy Disk Controller
----------~-----~--~-~----
inch floppy disk drives. It can read and write IBM 3749 single
interrupt syncronization.
Note: The controller cannot access both 8 inch and 5.25 inch drives
za0 Ml cycles and during wait and reset states. The memory can
Note : Any external DMA device that is using continous mode DMA
faster when holding the DMA request line for more than 1.5 ms This is
transfer rates. The ram row address is the low order address there-
for the entire ram array is refreshed by the DMA device every 128
4
1.3 System Monitor Eprom
to load the CP/M, MP/M or other boot loaders from floppy disk.
memory. When the prom is disabled. it does not use any system address
space.
Note : The serial ports are TTL and must be connected to external
(PS NET/I)
1.5 Parallel ports
A Za0A PIO is used as the parallel port. The "A" channel of this Cllip
~ctional data lines and two hand shake lines. The "B" port can be split
between the parallel port connector and the 9100 bus vectored interrupt
In the output mode the parallel ports can drive one TTL load •
5
1.6 Real Time Interrupt clock
A ZaeA CTC is used for providing a real time system clock fOI MP/M.
Three channels of the CTC are available to the user for strapping via
a jumper header for synchronous baud rates or long clock times.
The Sl00 bus interface provides the signals necessary for an 8 bit
bus master as described by the IEEE 696 bus specification.
vectored interrupt lines VIe - VI7 are supported via jumper options
and Al6 - A23 are also supported vis an I/O port.
The PAMNTON line is also implemented for the dynamic ram array.
6
2.0 EPROM and Monitor operation
7
The monitor commands are :
8
F4C1 00 Nap
F4C2 00 Nap
F4C3 00 NOP
F4C4 JEI3 MVI A,3 ; GET A RESTORE
E'4C6 038C OUT FDC ISSUE COMMAND
f'4C8 01 NOP
F403 AF XRA A
F404 6F MOV L,A POINT AT LaC 0
F405 67 MOV H,A
F406 3C INR A
F407 D3BE OUT FOCSEC SET SECTOR
F409 3E8C MVI A,B8CH GET READ COMMAND
F40B 030C OUT FOC ISSUE COMMAND
F4DD 80 NOP
FDCRO:
f'4DE D814 IN WAIT WAIT FOR INTRQ
F4EfJ 87 ORA A OR ORQ
F4E1 F2EBF4 JP BOOTON EXIT IF IN'I'RQ
F4E4 DBBF IN FOCOATA GET DATA
E4E6 77 MOV M,A STORE
F4E7 23 INX H ;. POIN'l' NEXT
F4E8 C3DEF4 JMP FOCRD
BOOTDN:
F4EB DB0C IN FOC CHECK S'l'ATUS
F'4EO B7 ORA A ~ = NO ERROR
F4EE CAee00 JZ 0 i OK, GO
F4Fl F5 PUSH PSW SAVE ERROR
F4F2 210FF6 LXI H,BTERR PRINT
F4F5 CDE6F0 CALL MSG DISK ERROR
F4F8 F1 POP PSW GE'l' ERROR
F4F9 C021Fl CALL THXB PRINT IT
9
INPUT / OUTPUT PORT ASSIGMENTS
Address Function
10
4.0 INPUT / OUTPUT PORT DISCRIPTIONS
11
4.7 Floppy Disk Contlol Port
14 Read/Write FDC Syncronization/Drive/Density
Port Read :
CC
When the cpu reads this port the cpu is placed into e wail
state until a data byte can be transfered to or from the flopp)
disk controller or untill the command complete/terminate status
(INTRO) is set by the floppy disk controller. The floppy disk
controller INTRQ status bit is placed on the data bus as bit D7.
This bit can be tested to determine if data is to be transfered
of if the command is complete.
+----+----+----+----+----+----+----+----+
! D7 ! D6 ! D5 1 04 ! 03 ! 02 ! DilDO ! D7 = MSB, D0 = LSB
+----+----+----+----+----+----+----+----+
1 1 1
I I ! I 1 +-- Don't care
I! I 1 +------- Don't care
I I I I +------------ Don't care
1 ! +----------------- Don't care
+---------------------- Don't care
I +--------------------------- Don't cale
1 +-------------------------------- Don't care
+------------------------------------- INTRQ* 0=active, l=inactive
Port write:
The low two bits 00 and Dl of this port control which drive is
selected.
Dl D0
o Disk drive" selected
"" I Disk
Disk
drive I
drive 2
selected
selected
1
I "
I Disk drive 3 selected
12
Bit 03 sets the density mode. When bit 03 = 0, single density is
+----+----+----+----+----+----+----+----+
! 07 1 D6 1 05 ! 04 ! 03 ! D2 ! D1 ! DO! 07 = MSB, DC = LSB
+----+----+----+----+----+----+----+----+
111 !
1 1 +-- Disk drive select bit 00
1 1 +------- Disk drive select bit D1
! 1 1 +------------ SIDE SELECT, 0=HEAD 0,l=HEAD 1
!! +----------------- Density, 0=single, 1=double
1 1 +---------------------- Don't care
+--------------------------- Don't care
+-------------------------------- Don't care
+------------------------------------- Don't care
+----+----+----+----+----+----+----+----+
1 07 ! 06 1 D5 1 04 ! D3 I D2 1 DIlDO! 07 = MSB, 00 = LSB
+----+----+----+----+----+----+----+----+
! 1 1
1 ! 1 ! +-- A16
1 II!! +------- A17
I! ! +------------ AlB
1 1 +----------------- A19
1 1 "I +---------------------- A20
1 +--------------------------- A21
+-------------------------------- A22
+------------------------------------- A23
13
4.9 On-Board Memor~ Control Port
16 Write On-Board Memory Control Port
Tilis port controls the onboard memory managment circuit,
Par L wI i te :
The fout low order bits D0,Dl,D2 and D3 switch the on board memolY
be accessed.
+ - - - - +- - - - +- - - - +- - - - ... - - - - +-- - - ... - - - - -to - - - - +
! 07 ! 06 1 05 ! 04 1 03 ! D2 ! 01 ! DO ! 07 = MSB, 00 = LSB
+----+----+----+----+----+----+----+----+
1 l=bank on, 0=bank off
1 +-- Memory Bank 0000H-3FFFH
1 +------- Memo I y Bank 4iHH?JH-7f F'FH
1 -t.------------ Memory Bank 8000H-BF'F'FH
+----------------- Menoty Bank C000H-FFFFH
+---------------------- Don't care
+--------------------------- PROM ~nab1e=0, Disable=1
+-------------------------------- Power on jump reset::l
+------------------------------------- Don' t ca r f-;
14
5.0 Jumper Definitions
Jumper E'unction
Jumper b connects the SIO channel l\ to €ither the internal baud rate
9 en era lor 0 Ito the con nee tor J 4 pin 9 to l use ins y C' ton 0 U S c~ p pI i l: uti a H S .-
15
Jumper B is located near J5.
+---+
1 I 1 Connector J5 pin 9
+---+
! 2 I SIO Tx/Rx clock input
+---+
! 3 ! Baud rate generator channel A
+---+
Install Plug between posts 1 & 2 for external SIO clock.
+---+
! 1 ! Connector J5 pin 9
+---+
! 2 ! SIO Tx/Rx clock input
+---+
1 3 ! Baud rate generator channel B
+---+
Install Plug between posts I & 2 for external SIO clock.
Install Plug between posts 2 & 3 and 4 & 5 for 5.25 inch drives.
16
Note: There ate other board modifications needed to interface
Install Plug between posts 2 & 3 for PINT interrupt pin. (Jl-73)
17
6.8 M Select 8109 interrupt vector VI2 or Parallel
Port B bit 02 on J2-29.
This jumper is located neat connector J2.
+---+---+---+
! 1 ! 2 1 3 !
+---+---+---+
Install Plug between posts 1 & 2 to connect the PIO bit 02
18
'l'hi s jumper is located near connector J2.
+---+---+---+
! 1 ! 2 ! 3 !
+--- .... ---+---+
Install Plug between posts 1 & 2 to connect the PlO bit 05
•
Install Plug between posts 2 & 3 to connect the PlO bit 05
19
Jumper R configures the board to accept a 2716 or 2732 EPROM.
+---+
! 1 1 Address line All
+---+
1 2 ! EPROM input
+---+
! 3 ! +5 volts
+---+
Install plug between posts 1 & 2 fot' a 2732 EPROM.
20
6.16 T E n a b l e / Disable 5100 bus memory write signal on
J1 - 68
This jumper is located near U18.
+---+---+
! 1 ! 2 !
+---+---+
Install Plug between posts 1 & 2 to connect the memory write
'I'he baud rate of the two serial channels can be select separately
switches 1,2,3,4 set the baud rate for the 510 channel Band
switches 5,6,7,8 set the baud rate for the 510 channel A.
SW1
+-------------------------------+
! 8 ! 7 ! 6 ! 5 ! 4 ! 3 ! 2 ! 1 !
OFF (up)
+-------------------------------+
(- Channel B -) (- Channel A -)
ON (down)
21
8.0 External Connector Pin definitions
1 +8V 51 +8V
2 +16V 52 -16V
3 XRDY 53 GND
4 VI0* 54 SLAVE CLR*
5 VIl* 55-57 DMAO*-DMA2*
6 VI2* 58 SXTRQ*
7 VI3* 59 A19
8 VI4* 60 SIXTN*
9 VI5* 61-64 A20-A23
10 VI6* 65,65 NDEF
11 VI7* 67 PHAN'l'OM*
12 NM1* 68 MWRT
13 ' PWRFAIL* 69 RFU
14 DMA3* 70 GND
15 A18 71 RFU
16 A17 72 ROY
17 A16 73 INT*
18 SOSB* 74 HOLO*
19 CDSB* 75 RESET~;
20 GND 76 PSYNCH
21 NDEF 77 PWR*
22 ADSS* 78 POBIN
23 DOOSB* 79-87 A0-A11
24 o 88-95 D02-010
25 PSTVAL* 96 SINTA
26 PHLOA 97 SWO*
27,28 RFU 98 ERROR*
29-34 A5,A4,A3,A15,AI2,A9
35 ~Ol/DATA 1 99 POC*
36 D00/DATA 0 100 GNO
37 A10
38 004
39 DOS
40-43 006,012,OI3,DI7
44 SMI
45 SOUT
46 SINP
47 SMEMR
48 SHLTA
49 CLOCK
50 GND
22
8.2 Connector J2 Parallel port connector
23
8.3 Connector J3 Floppy disk connector
1 ground
2 Alternate Head 2*
3 ground
4 N/C
5 ground
6 N/C
~
I ground
8 N/C
9 ground
10 N/C
11 glound
12 N/C
13 ground
14 Head 2*
15 ground
16 N/C
l7 1 ground
18 2 Head load*
19 3 ground
20 4 Index*
21 5 ground
22 6 Ready*
23 7 ground
24 8 Above Track 43*
25 9 ground
26 10 Drive select 0""
27 11 ground
28 12 Drive select 1*
29 13 ground
30 l4 Drive select 2*
31 15 ground
32 16 Drive select 3'11
33 17 ground
34 18 Direction
35 19 ground
36 20 Step*
37 21 ground
38 22 Write Data*
39 23 ground
40 24 Write gate*
41 25 ground
42 26 Track 0*
43 27 glound
44 28 Write protect*
45 29 ground
46 30 Read data*
47 31 ground
48 32 Motor on*
49 33 ground
50 34 N/C
24
8.4 Connector J4 Serial port Channel A
1 N/C
2 DCDA* Data Carrer Detect Channel A *
3 SYNCA* Sync Detect
4 RxDA Receive data
5 CTSA* Clear to send
6 TxDA Transmit data
7 RTSA* Request to send
8 DTRA* Data terminal ready
9 Tx/RxCA* Transmitt / receive clock
10 GND
11 N/C
12 +16 VOLTS
13 -16 VOLTS
14 +5 VOLTS
1 N/C
2 DeDA* Data Carrer Detect Channel A ".
3 SYNCA" Sync Detect
4 RxDA Receive data
5 CTSA* Clear to send
6 TxDA Transmit data
7 RTSA* Request to send
8 DTRA* Data terminal ready
9 Tx/RxCA* Transmitt / receive clock
10 GND
11 N/C
12 +16 VOLTS
13 -16 VOLTS
14 +5 VOL'I'S
25
+-----------+
! connector !
+------------+
! connector
+----+
!conn!
+----+
!conn!
+-+-----+---+ +-----+------+ +-+--+ +--+-+
1 ! +-------+ !
+-----+jumpers!
+--+----+
+-+-----+--+ +-----+------+
! Floppy disk!
+-+---------+-+
! A Serial B !
! Parallel !
ports ! controller! 1 ports
+--+-------+ +-----+------+ +-----+-------+
+----+---------------------------+--------------------+
+-+
~-----+
!clock!
+-----+
leprom!
+-----+------+
CPU
+-----+-------+
Ram Array!
!2k,4k+--+--+ !
+-----+ +-----+ +------------+ +-----+-------+
+-------+--+
! data rec.!
+-------+------+
! 5100 address !
! /drivers ! ! drivers
+-----------1- +-------+------+
VI +-----------------------------+
lines
+----+---------+-----------+---------------------------------+
S100 BUS
f------------------------------------------------------------+
26
10.0 Factory Installed Jumpers
27
10.2 Factory Installed jumpers for 5.25 inch floppy option
Jumper
28
10.3 Shugart SA 800 Jumpers
29
10.7 TANDON SLIM LINE
Disk drive jumpers
DSl OR DS2
INSTALL THE TERMINATION RES. AT THE END OF THE CABLE
DSI OR DS2
CUT X
CUT Z
CUT L
INSTALL Y
INSTALL C
30
11.0 Appendex & Data sheets
31
_I..r'...........
18470 zaer DUI'
.aI Alyac:laroB.as
n.r
Prodacl
IpacHlc:ad.B
March 1981
• Two independent full-duplex channels with • In xl clock mode, data rates are 0 to SOOK
separate modem controls. Modem status can
be monitored.
bits/second with a 2.5 MHz clock, or 0 to
BOOK hits/second with a 4.0 MHz clock. I
• Receiver data registers are quadruply buf-
fered; the transmitter is doubly buffered.
• Interrupt features include a programmable
interrupt vector, a "status affects vector"
• Programmable options include I, 1Y2 or 2
stop bits; even, odd or no parity; and xl,
xI6, x32 and x64 clock modes.
• Break generation and detection as well as
i
mode for fast interrupt processing, and the parity-, overrun- and framing-error detec-
standard Z-80 peripheral daisy-chain inter- tion are available.
rupt structure that provides automatic inter-
rupt vectoring with no external logic.
The Z-80 DART (Dual-Channel Asynchro- modem controls are not needed, these lines
nous Receiver/Transmitter) is a dual-channel can be used for general-purpose VO.
multi-function peripheral compOnent that Zilog also offers the Z-80 SIO, a more ver-
satisfies a wide variety of asynchronous serial satile device that provides synchronous
data communications requirements in micro- (Bisync, HDLC and SDLC) as well as asyn-
computer systems. The Z-80 DART is used as a chronous operation.
serial-to-parallel, parallel-to-serial converterl The Z-80 DART is fabricated with n-channel
controller in asy.nchronous applications. In silicon-gate depletion-load technology, and is
addition, the device also provides modem con- packaged in a 40-pin plastic or ceramic DIP.
trols for both channels. In applications where
RaGA
Ilia
ToDA
r.a 0, «I Do
WiIiIm Us 31 U.
Clf.A Os 31 D.
}~
!ill II-, 37 De
IITIl IRT 31 iiiiil:i
CTIl lEi 35 er
Imm lEO 34 1111
IR!IJl III 33 CIO
Yoo 32 1m
-=
~ :
COIITIIOL iOiiQ RaDB
IiiTil!I
WiIIliYl
m
RaDA
RiCA
10
II
12
13
Z·NDAIIT
31
30
21
•
GND
W/RDYB
lUI
!bOB
1
ToDB
~ 14 27 iiiTi9
WiiiiiiI
ToGA 15 21 ToDB
IIIl CN·. I5fiIl Ie 25 iiiiiii
-}~
IifiA ~ 17 24 ii'fii
CfiA ~ II 23 CTii
~ 6eI5I
DTRB
IR!1II
CLK ... 20 " 22
21 mn
89
PIn B/A. Channel A Or B Select (input, High as an interrupt acknowledge if the Z-80 DART
DMcrIptioD selects Channel B). This input defines which is the highest priority device that has iriter-
channel is accessed during a data transfer be- rupted the 2-80 CPU.
tween the CPU and the Z-80 DART. IORQ. Input/Output Request (input from CPU,
C/D. Control Or Data Select (input, High active Low). 10RQ is used in conjunction with
selects Control). This input specifies the type B/A, c/o, CE and RD to transfer commands
of information (control or data) transferred on and data between the CPU and the 2-80 .
the data bus betwe,en the CPU and the Z-80 DART. When CE, RD and 10RQ are all
DART. active, the channel selected by BIA transfers
CE. Chip Enable (input, activ~ Low). A Low at data to the CPU (a read operation). When CE
this input enables the Z-80 DART to accept and 10RQ are active, but RD is inactive, the
command or data input from the CPU during a channel selected by B/A is written to by the
write cycle, or to transmit data to the CPU CPU with either data or control information as
during a read cycle. specified by c/o.
CLK. System Clock (input). The Z-80 DART RxCA. RxCB. Receiver Clocks (inputs).
uses the standard Z-80 single-phase system Receive data is sampled on the rising edge of
clock to synchronize internal signals. RxC. The Receive Clocks may be 1, 16,32 or
64 times the data rate.
CTSA. CTSB. Clear To Send (inputs, active
Low). When programmed as Auto Enables, a RD. Read Cycle Status. (input from CPU, ac-
Low on these inputs enables the respective tive Low). If RD is active, a memory or 110
transmitter. If not programmed as Auto read operation is in progress.
Enables, these inputs may be programmed as RxDA. RxDB. Receive Data (inputs, active
general-purpose inputs. Both inputs are High).
Schmitt-trigger buffered to accommodate slow-
RESET. Reset (input, active Low). Disables
risetime signals.
both receivers and transmitters, forces TxDA
Do-D,. System Data Bus (bidirectional, and TxDB marking, forces the modem controls
3-state) transfers data and commands between High and disables all interrupts.
the CPU and the 2-80 DART.
RIA. RIB. Ring Indicator (inputs, Active
DCDA. DCDB. Data Carrier Detect (inputs, Low). These inputs are similar to CTS and
active Low). These pins function as receiver DCD. The Z-80 DART detects both logic level
enables if the Z-80 DART is programmed for transitions and interrupts the CPU. When not
Auto Enables;· otherwise they may be used as used in switched-line applications, these inputs
general-purpose input pins. Both pins are can be used as general-purpose inputs.
Schmitt-trigger buffered. RTSA. RTSB. Request to Send (outputs,
DTRA. DTRB. Data Terminal Ready (outputs, active Low). When the RTS bit is set, the RTS
active Low). These outputs follow the state pro- output goes Low. When the RTS bit is reset,
grammed into the DTR bit. They can also be the output goes High after the transmitter
programmed as general-purpose outputs. empties.
lEi. Interrupt Enable In (input, active High) is TxCA. TxCB. Transmitter Clocks (inputs). TxD
used with lEO to form a priority daisy chain changes on the falling edge of TxC. The
when there is more than one interrupt-driven Transmitter Clocks may be I, 16, 32 or 64
device. A High on this line indicates that no times the data rate; however, the clock
other device of higher priority is being ser- multiplier for the transmitter and the receiver
a
viced by CPU interrupt service routine. must be the same. The Transmit Clock inputs
lEO. Interrupt Enable Out (output, active are Schmitt-trigger buffered. Both the Receiver
High). lEO is High only if lEI is High and the and Transmitter Clocks may be driven by the
CPU is not servicing an interrupt from this 2-80 CTC Counter Time Circuit for program-
Z-80 DART. Thus, this signal blocks lower mable baud rate generation.
priority devices from interrupting while a TxDA. TxDB. Transmit Data (outputs, active
higher priority device is being serviced by its High).
CPU interrupt service routine. W/ltDYA. W/RDYB. Wait/Ready (outputs,
INT. Interrupt Request (output, open drain, open drain when programmed for Wait func-
active Low). When the Z-80 DART is re- tion, driven High and Low when programmed
questing an interrupt, it pulls INT Low. for Ready function). These dual-purpose out-
NI. Machine Cycle One (input from Z-80 puts may be programmed as Ready lines for a
CPU, active Low). When MI and RD are both DMA controller or as Wait lines that syn-
active, the 2-80 CPU is fetching an instruction chronize the CPU to the Z-80 DART data rate.
from memory; when Ml is active while 10RQ is The reset state is open drain.
active, the Z-80 DART accepts MI and IORQ
90
FUDCtloaai The functional capabilities of the Z-80 DART shake capability.
o.cnptloa can be described from two different points of The first part of the follOWing functional
view: as a data communications device, it description introduces Z-80 DART data com-
transmits and receives serial data, and meets munications capabilities; the second part
the requirements of asynchronous data com- describes the interaction between the CPU and
munications protocols; as a Z-80 family the Z-80 DART.
peripheral, it interacts with the Z-80 CPU and A more detailed explanation of Z-80 DART
other Z-80 peripheral circuits, and shares the operation can be found in the Z-80 S10 Tech-
data, address and control buses, as well as nical Manual (Document Number 03-3033-00.
being a part of the Z-80 interrupt structure. As Because this manual was written for the
a peripheral to other microprocessors, the Z-BO Z-80 SIO, it contains information about syn-
DART offers valuable features such as non- chronous as well as asynchronous operation.
vectored interrupts, polling and simple hand-
CommuDlcatloDB CapablUties. The Z-80 Framing errors and overrun errors are
DART provides two independent full-duplex detected and buffered together with the
channels for use as an asynchronous character on which they occurred. Vectored
receiver/transmitter. The following is a short interrupts allow fast servicing of interrupting
description of receiver/transmitter capabilities.
For more details, refer to the Asynchronous
conditions using dedicated routines. Further-
more, a built-in checking process avoids inter- I
I
Mode section of the Z-80 S10 Technical preting a framing error as a new start bit: a
Manual. The Z-80 DART offers transmission framing error results in the addition of one-half
and reception of five to eight bits per a bit time to the point at which the search for
character, plus optional even or odd parity. the next start bit is begun.
The transmitter can supply one, one and a half The Z-80 DART does not require symmetric
or two stop bits per character and can provide Transmit and Receive Clock signals-a feature
a break output at any time. The receiver break that allows it to be used with a Z-80 CTC or
detection logic interrupts the CPU both at the any other clock source. The transmitter and
start and end of a received break. Reception is receiver can handle data at a rate of 1, 1116,
protected from spikes by a transient spike re- 1/32 or 1164 of the clock rate supplied to the
jection mechanism that checks the signal one- Receive and Transmit Clock inputs. When
half a bit time after a Low level is detected on using Channel B, the bit rates for transmit and
the Receive Data input. If the Low does not receive operations must be the same because
persist-as in the case of a transient-the RxC and TxC are bonded together (RxTxCB).
character assembly process is not started.
1/0 lat.rface Capabllltles. The Z-80 DART and from the CPU. The Block Transfer mode
offers the choice of Polling, Interrupt (vectored can be implemented under CPU or DMA
or non-vectored) and Block Transfer modes to control.
transfer data, status and control information to
SERIAl DATA
CHANNEL CLOCKS
WiITiII6lW
INTERNAl CHANNEL A
CONTROl. RIEADlWRITE
LOGIC REGISTERS
_OR
OTHER CONTROLS
OATA . . . .
CPU
SUS tID
Ail
INTERRUPT INTERRUPT CHANNELS
CONTROl. CONTROl RIEADlWRtTE
LINES LOGIC I:EGlSTEAS
SERiAl DATA
CHANNEL ClOCK
fff
+IVGND CLK
WAiliiimiV
2044·001 91
Fu~c:tloDal POLLING. There are no interrupts in the .status bits Do and O2 indicate that a data
DetlcrlptloD Polled mode. Status registers RRO and.RRl are transfer is needed. The status also indicates
(Continued) updated at appropriate times for each function Error or other special status conditions (see
being performed. All the interrupt modes of "Z-80 DART Programming"). The Special
the Z-80 DART must be disabled to operate the Receive Condition status contained in RRI
device in a polled environment. does not have to be read in a Polling sequence
While in its Polling sequence, the CPU because the status bits in RRlare accom-
examines the status contained in RRO for each panied by a Receive Character Available
channel; the RRO status bits serve as an status in RRO.
acknowledge to the Poll inquiry. The two RRO
INTERRUPTS. The Z-80 DART offers an empty.) When enabled, the receiver can inter-
elaborate interrupt scheme that prOVides fast rupt the CPU in one of three ways:
interrupt response in real-time applications. As • Interrupt ,on the first received character
a member of the Z-80 family, the Z-80 DART
can be daisy-chained along with other Z-80 • Interrupt on all received characters
peripherals for peripheral interrupt-priority • Interrupt on a Special Receive condition
resolution. In addition, the internal interrupts Interrupt On First Character is typically
of the Z-80 DART are nested to prioritize the used with the Block Transfer mode. Interrupt
various interrupts generated by Channels A On All Receive Characters can optionally
and B. Channel B registers WR2 and RR2 con- modify the interrupt vector in the event of
tain the interrupt vector that points to an inter- a parity error. The Special Receive Condition
rupt service routine in the memory. To interrupt can occur on a character basis. The
eliminate the necessity of writing a status Special Receive condition can cause an inter-
analysis routine, the Z-80 DART can modify the rupt only if the Interrupt On First Receive
interrupt vector in RR2 so it points directly to Character or Interrupt On All Receive Char-
one of eight interrupt service routines. This is acters mode is selected. In Interrupt On First
done under program control by setting a pro- Receive Character, an interrupt can occur
gram bit (WRl, O2) ip Channel B called from Special Receive conditions (except Parity
"Status Affects Vector." When this bit is set, Error) after the first receive character interrupt
the interrupt vector in RR2 is modified accord- (example: Receive Overrun interrupt).
ing to the assigned priority of the various The main function of the External/Status
interrupting conditions. interrupt is to monitor the signal transitions of
Transmit interrupts, Receive interrupts and the CTS, OeD and RI pins; however, an
External/Status interrupts are the main sources External/Status interrupt is also caused by the
of interrupts. Each interrupt source is enabled detection of a Break sequence in the data
under program control with Channel A having stream. The interrupt caused by the Break
a higher priority than Channel B, and with sequence has a special feature that allows the
Receiver. Transmit and External/Status inter- Z-80 DART to interrupt when the Break
rupts prioritized in that order within each sequence is detected or terminated. This
channel. When the Transmit interrupt is feature facilitates the proper termination of the
enabled, the CPU is interrupted by the curren! message, correct initialization of the
transmit buffer becoming empty. (This implies next message, and the accurate timing of the
that the transmitter must have had a data Break condition.
character written into it so it can become
CPUIDMA BLOCK TRANSFER. The Z-80 Transfer mode or as a Ready line in the DMA
DART provides a Block Transfer mode to Block Transfer mode.
accommodate CPU block transfer functions To a DMA controller, the Z-80 DART Ready
and DMA block transfers (Z-80 DMA or other output indicates that the Z-80 DART is ready to
designs). The Block Transfer mode uses the transfer data to or from memory. To the CPU,
W/RDY output in conjunction with the the Wait output indicates that the Z-80 DART is
Wait/Ready bits of Write Register 1. The not ready to transfer data, thereby requesting
W/RDY output can be defined under software the CPU to extend the 110 cycle.
control as aWait line in the CPU Block
92
Internal The device internal structure includes a 2-80 organize the programming process.
ArchItecture CPU interface, internal control and interrupt The logic for both channels provides for-
logic, and two full-duplex channels. Each mats, bit synchronization and validation for
channel contains read and write registers, and data transferred to and from the channel inter-
discrete control and status logic that provides face. The modem control inputs Clear to Send
the interface to modems or other external (CTS), Data Carrier Detect (DCD) and Ring
devices. Indicator (HI) are monitored by the control
The read and write register group includes logic under program control. All the modem
five 8-bit control registers and two status control signals are general purpose in nature
registers. The interrupt vector is written into and can be used for functions other than
an additional 8-bit register (Write Register 2) modem control.
in Channel B that may be read through Read For automatic interrupt vectoring, the inter-
Register 2 in Channel B. The registers for both rupt control logic determines which channel
channels are designated as follows: and which device within the channel has the
highest priority. Priority is fixed with Channel
WRO-WRS - Write Registers 0 through S
A assigned a higher priority than Channel B;
RRO- RR2 - Read Registers 0 through 2
Receive, Transmit and External/Status inter-
The bit assignment and functional grouping rupts are prioritized in that order within each
of each register is configured to simplify and channel.
I
Data Path. The transmit and receive data path
illustrated for Channel A in Figure 4 is iden-
tical for both channels. The receiver has three
8-bit buffer registers in a FIFO arrangement in
service a Receive Character Available inter-
rupt in a high-speed data transfer.
The transmitter has an 8-bit transmit data
register that is loaded from the internal data
i
addition to the 8-bit receive shift register. This bus, and a 9-bit transmit shift register that is
scheme creates additional time for the CPU to loaded from the transmit data register.
2044-003
93
Read. Read Cycle. The timing signals generated by Status byte from the Z-80 DART are illustrated
Write aDCl a Z-80 CPU input instruction to read a Data or in Figure Sa.
Interrupt
TlmlDg
Writ. Cycle. Figure Sb illustrates the timing put instruCtion to write a Data or Control byte
and data signals generated by a Z-80 CPU out- into the Z-80 DART.
Interrupt Aclmowledge Cycle. After receiv- To insure stable conditions in the daisy
ing an Interrupt Request signal (INT pulled chain, all interrupt status signals are prevented
Low), the Z-OO CPU sends an Interrupt from changing while MI is Low. When IORQ is
Acknowledge signal (MI and IORQ both Low). Low, the highest priority interrupt requestor
The daisy-chained interru'pt circuits determine (the one with lEI High) places its interrupt vec-
the highest priority interrupt requestor. The lEI tor on the data bus and sets its internal
of the highest priority peripheral is terminated interrupt-under-service latch.
High. For any peripheral that has no interrupt Refer to the Z-80 SIO Technical Manual for
pending or under service, lEO =lEI. Any additional details on the interrupt daisy chain
peripheral that does have an interrupt pending and interrupt nesting.
or under service forces its lEO Low.
Return From Interrupt Cycle. Normally, the When used with other CPUs, the Z-80 DART
Z-80 CPU issues an RETI (Return From Inter- allows the user to return from the interrupt
rupt) instruction at the end of an interrupt ser- cycle with a special command called "Return
vice routine. RETI is a 2-byte opcode (ED-4D) From Interrupt" in Write Register 0 of Channel
that resets the interrupt-under-service latch to A. This command is interpreted by the Z-80
terminate the interrupt that has just been DART in exactly the same way it would inter-
processed. pret an RET! command on the data bus.
CLOCK CLOCK
CE
------,~+-------------'
Ci
----
Rti---------------------------
~----------~-------------------- ~------------------------------
DATA ----------------0000(0...--- DATA __________-J)(~ _____IN_____>e:::::
Figure Sa. Read Cycle Figure 5b. Write Cycle
CLOCK
~ ~'--------,
' ___I
iiD-----------------------
I
---------~r_--__.~-----
IEI _ ________ \ ____ _
IEI------ I
DATA----------------~~~------
------.1
lEO _ _ _ _ _ _ _...IJ r---
'
Figure Sc. Interrupt Acknowledge Cycle Figure 5d. Return from Interrupt Cycle
Write Registers. The Z-80 DART contains six pointed to in the same operation as a channel
registers (WRO-WR5) in each channel that are reset.
programmed separately by the system program
to configure the functional personality of the Write Register Functions
channels (Figure 4). With the exception of
WRO, programming the write registers requires WRO Register pointers, initialization commands for
two bytes. The first byte contains three bits the various modes, etc.
(Do-D2) that point to the selected register; the WRI TransmitlReceive interrupt and data transfer
second byte is the actual control word that is mode definition.
written into the register to configure the Z-80
DART.
WR2
WR3
Interrupt vector (Channel B only)
Receive parameters and control
I
WRO is a special case in that all the basic
commands- (CMDo-CMD2) can be accessed
with a single byte. Reset {internal or external}
initializes the pointer bits Do-D2 to point to
WR4
WR5
TransmitlReceive miscellaneous parameters
and mooes
Transmit parameters and controls
§
WRO. This means that a register cannot be
Read Registers. The Z-80 DART contains The status bits of RRO and RRI are carefully
three registers (RRO-RR2) that can be read to grouped to simplify status monitoring. For
obtain the status information for each channel example, when the interrupt vector indicates
(except for RR2, which applies to Channel B that a Special Receive Condition interrupt has
only). The status information includes error occurred, all the appropriate error bits can be
conditions, interrupt vector and standard read from a single register (RRl).
communications-interface signals.
To read the contents of a selected read Read Register FundioDS
register other than RRO, the system program
must first write the pointer byte to WRO in RRO TransmitlReceive buffer status, interrupt
exactly the same way as a write register opera- status and external status
tion. Then, by executing an input instruction, RRI Special Receive Condition status
the contents of the addressed read register can
RR2 Modified interrupt vector (Channel B only)
be read by the CPU.
95
Z-80 DART READ REGISTER 0
Read and Write I~~I~ ~ ~I~I~I~I
Reglsten
~~
I
~
L: :TC;E:~:.~~:~:~:~~
T. BUFFER EMPTY
~D
CTS
} USED WITH "EXTERNAU
STATUS INTERRUPT"
NOT USED MODE
~--------------BRPK
ID~7ID~'!Ds~ID~'~~ALLSENT
1~IDsIDsIDsI~I~I~IDsI
~ I~V4
~~::
L-NOTUSED
PARITY ERROR
R. OVERRUN ERROR !INTERRUPT
FRAMING ERROR VECTOR
NOT USED VS
"Used Wllh Special Receive Condition Mode VI
~------------- V7
""Variable JI ·Slatus Affects
Vector Is Programmed
T-C!
1~1~IDsiDsIDsIDsI~IDsI
~
L EXT INT ENABLE
REGISTER 0
REGISTER 1
REGISTER 2
REGISTER 3
REGISTER 4
REGISTER 5
T o
o
1
0
1
0
L T. INT ENABLE
STATUS AFFECTS VECTOR
(CH. BONlY)
R. INT DISABLE
R. INT ON FIRST CHARACTER
IN!;>F~~~~ :~gT'6AR~ACTER.S (PARITY
}
OR ON
:~~~:~~
o 0
NULL CODE
INT ON All Rx CHARACTERS (PARITY CONDITION
0o NOT USED DOES NOT AFFECT VECTOR)
1o RESET EXT/STATUS INTERRUPTS
WAIT/READY ON R/T
o 1 CHANNEL RESET L - -_ _ _ _ _ _
~ I~V4
~~ T
LR.ENABlE
I L - - NOT USED
" - - - - - - - - - AUTO ENABLES
Rx 5 BITS/CHARACTER
!INTERRUPT R. 7 BITS/CHARACTER
VECTOR
Rx I BITS/CHARACTER
VS R. 8 BITS/CHARACTER
V6
L----------------V7
ITT o
o
1
1
o
o
1
I
L
0
1
0
1
0
1
0
L PARITY ENABLE
PARITY EVEN/ODfi
NOT USED
1 STOP BIT/CHARACTER
1 'I. STOP BITS/CHARACTER
2 STOP BITS/CHARACTER
NOT USED
Xl CLOCK MODE
Xl6 CLOCK MODE
X32 CLOCK MODE
T~ o
o
1
1
"-----DTR
0
1
0
1
I ~ :~;USED
~ NOTUSED
T. ENABLE
SEND BREAK
Tx 5 BITS (OR lESS)lCHARACTER
T. 7 BITS/CHARACTER
Tx 6 BITS/CHARACTER
T.8 BITS/CHARACTER
2044·()()4.oo5
96
11.2 Appendex B - Z80A PIO ••••••••••••••••••
Z8420
Z80~ PIO Parallel
lapat/Oatpat Coatroller
Prodac:t
Spec:Uic:atioa
March 1981
General The Z-80 PIO Parallel I/O Circuit is a pro- accomplished under interrupt control. Thus,
Description grammable, dual-port device that provides a the interrupt logic of the PIO permits full use
TTL-compatible interface between peripheral of the efficient interrupt capabilities of the
devices and the Z-80 CPU. The CPU config- Z-80 CPU during 110 transfers. All logiC
ures the Z-80 PIO to interface with a wide necessary to implement a fully nested interrupt
range of peripheral devices with no other structure is included in the PIa.
external logic. Typical peripheral devices that Another feature of the PIa is the ability to
are compatible with the Z-80 PIO include most interrupt the CPU upon occurrence of speci-
keyboards, paper tape readers and punches, fied status conditions in the peripheral device.
printers, PROM programmers, etc. For example, the PIO can be programmed to
One characteristic of the Z-80 peripheral interrupt if any speCified peripheral alarm con-
controllers that separates them from other ditions should occur. This interrupt capability
interface controllers is that all data transfer reduces the time the processor must spend in
between the peripheral device and the CPU is polling peripheral status.
D,~ 1 40 0,
D,~ 39 D.
D6E 38 OS
UTA/
aus CE
c/o
37
38
M1
lORa
PORTA
B/A 35 iiii
A, 34 B,
Aa 33 B6
As 32 Bs
Aa 10 31 B.
ASTB Z·80 PIO
GND 11 30 B,
"oj
CONTROL Z-80PIO
8,
A,
A,
A,
Aa
12
13
14
15
29
28
27
26
B,
IJ B,
Bo
+5V
ASTB 16 25 ClK
BSTB 17 24 lEI
PORTB
ARDY 18 23 iNT
Do 19 22 lEO
D, 20 21 BRDY
INTURUPT {
CONTROL
lEO
}IHII, 0297,0298 45
General The Z-80 PIO interfaces to peripherals via not used. Instead, an interrupt is generated if
Description two independent general-purpose I/O ports, the condition of one input changes, or if all
(Continued) designated Port A and Port B. Each port has inputs change. The requirements for gener-
eight data bits and two handshake signals, ating an interrupt are defined during the pro-
Ready and Strobe, which control data transfer. gramming operation; the active level is
The Ready output indicates to the peripheral specified as either High or Low, and the logic
that the port is ready for a data transfer. condition is specified as either one input active
Strobe Is an input from the peripheral that (OR) or all inputs active (AND). For example,
indicates when a data transfer has occurred. if the port is programmed for active Low
Operating Modes. The Z-80 PIO ports can be inputs and the logic function is AND, then all
programmed to operate in' four modes: byte inputs at the speCified port must go Low to'
output (Mode O), byte input (Mode 1), byte generate an interrupt.
Data outputs are controlled by the CPU and
input/output (Mode 2) and bit input/output
(Mode 3). can be written or changed at any time.
In Mode 0, either Port A or Port B can be • Individual bits can be masked off.
programmed to output data. Both ports have • The handshake signals are not used in
output registers that are individually addressed Mode 3; Ready is held Low, and Strobe is
by the CPU; data can be written to either port disabled.
at any time. When data is written to a port, an
active Ready output indicates to the external • When using the Z-80 PIO interrupts, the
device that data is available at the associated Z-80 CPU interrupt mode must be set to
port and is ready for transfer to the external Mode 2.
device. After the data transfer, the external
device responds with an active Strobe input, SYSTEM
BUSES
which generates an interrupt, if enabled.
In Mode I, either Port A or Port B can be
configured in the input mode. Each port has
an input register addressed by the CPU. When
the CPU reads data from a port, the PIO sets PIG
the Ready signal, which is detected by the
external device. The external device then
places data on the I/O lines and strobes the
I/O port, which latches the data into the Port
Input Register, resets Ready, and triggers the lEI
Interrupt Request, if enabled. The CPU can
read the input data at any time, which again
sets Ready.
Mode 2 is bidirectional and uses Port A,
plus the interrupts and handshake signals from
both PGfts. Port B must be set to Mode 3 and
masked off. In operation, Port A is used for
both data input and output. Output operation lEO
RxCA INT
is similar to Mode 0 except that data is allowed TxCA lEI
out onto the Port A bus only when ASTB is RxCD
Low. For input, operation is similar to Mode 1, fiCa
except that the data input uses the Port B
RDY
handshake signals and the Port B interrupt (if
enabled). DMA
2041-0156
46
Internal The internal structure of the Z-80 PIa con- The mask control register specifies two
Structure sists of a Z-80 CPU bus interface, internal con- conditions: first, whether the active state of
trollogic, Port A I/O logic, Port B I/O logic, the input bits is High or Low, and second,
and interrupt control logic (Figure 4). The whether an interrupt is generated when any
CPU bus interface logic allows the Z-80 PIO to one unmasked input bit is active (OR condi-
interface directly to the Z-80 CPU with no tion) or if the interrupt is generated when
other external logic. The internal control logic all unmasked input bits are active (AND
synchronizes the CPU data bus to the per- condition) .
ipheral device interfaces (Port A and Port B). Interrupt Control Logic. The interrupt control
The two I/O ports (A and B) are virtually logic section handles all CPU interrupt pro-
identical and are used to interface directly to tocol for nested-priority interrupt structures.
peripheral devices. Any device's physical location in a daisy-chain
Port Logic. Each port contains separate input configuration determines its priority. Two lines
and output registers, handshake control logic, (lEI and lEO) are prOVided in each PIa to
and the control registers shown in Figure 5. form this daisy chain. The device closest to the
All data transfers between the peripheral unit CPU has the highest priority. Within a PIa,
and the CPU use the data input and output Port A interrupts have higher priority than
registers. The handshake logic associated with those of Port B. In the byte input, byte output,
each port controls the data transfers through
the input and the output registers. The mode
or bidirectional modes, an interrupt can be
generated whenever the peripheral requests a I
control register (two bits) selects one of the
four programmable operating modes.
The control mode (Mode 3) uses the remain-
new byte transfer. In the bit control mode, an
interrupt can be generated when the periph-
eral status matches a programmed value. The
B
ing registers. The input/output control register PIa provides for complete control of nested
specifies which of the eight data bits in the interrupts. That is, lower priority devices may
port are to be outputs and enables these bits; not interrupt higher priority devices that have
the remaining bits are inputs. The mask reg- not had their interrupt service routines com-
ister and the mask control register control pleted by the CPU. Higher priority devices
Mode 3 interrupt conditions. The mask register may interrupt the servicing of lower priority
specifies which of the bits in the port are devices.
active and which are masked or inactive.
DATA
OR CONTROL
} HANDSHAKE
PERIPHERAL
IIIT.PACE
DATA
OR CONTROL
} HANDSHAKE
"I'llf, !llIh 47
Internal If the CPU (in interrupt Mode 2) accepts an Interrupt) instruction directly from the CPU
Structure interrupt. the interrupting device must provide data bus so that each PIO in the system knows
(Continued) an 8-bit interrupt vector for the CPU. This vec- at all times whether it is being serviced by the
tor forms a pointer to a location in memory CPU interrupt service routine. No other com-
where the address of the interrupt service munication with the CPU is required.
routine is located. The 8-bit vector from the
interrupting device forms the least significant CPU Bus 1/0 Logic. The CPU bus interface
eight bits of the indirect pointer while the logic interfaces the 2-80 PIO directly to the
I Register in the CPU provides the most signifi- 2-80 CPU, so no external logic is necessary.
cant eight bits of the pointer. Each port (A and For large systems, however, address decoders
B) has an independent interrupt vector. The and/or buffers may be necessary.
least significant bit of the vector is automati- Intemal Control Logic. This logic receives the
cally set to 0 within the PIO because the control words for each port duf-ing program-
pointer must point to two adjacent memory ming and, in turn, controls the operating func-
locations for a complete 16-bit address. tions of the 2-80 PIO. The control logic syn-
Unlike the other 2-80 peripherals, the PIO chronizes the port operations, controls the port
does not enable interrupts immediately after mode, port addressing, selects the read/write
programming. It waits until M1 goes Low (e.g., function, and issues appropriate commands to
during an opcode fetch). This condition is the ports and the interrupt logic. The 2-80 PIO
unimportant in the 2-80 environment but might does not receive a write input from the CPU;
not be if another type of CPU is used. instead, the RD, CE, cii5 and IORQ signals
The PIO decodes the RETI (Return From generate the write input internally.
MODE
CONTROL
REGISTER
(2 BITS)
II-BIT UO BUS
HAND- READY }
INTERRUPT
CONTROL
SHAKE HANDSHAKa
CONTROL STROBE CONTROL
lOGIC lOGIC
20060317
48
ProgrClllUDing Mode O. 1. or 2. (Byte Input, Output, or Interrupt Control Word. In Mode 3, handshake is not
Bidirectional). Programming a port for Mode used. Interrupts are generated as a logic function of the
input signal levels. The interrupt control word sets the
0, 1, or 2 requires two words per port. These logic conditions and the logic levels required for gener-
words are: ating an interrupt. Two logic conditions or functions are
available: ANO (if all input bits change to the active level,
A Mode Control Word. Selects the port operating mode an interrupt is triggered), and OR (if anyone of the input
(Figure 6). This word may be written any time. bits changes 10 the active level, an interrupt is triggered).
An Interrupt Vector. The Z-80 PIO Is designed for use with Bit 0 6 sets the logic function, as shown in Figure 9. The
the Z-80 CPU in interrupt Mode 2 (Figure 7). When inter- active level of the input bits can be set either High or Low.
rupts are enabled, the PIO must provide an interrupt The active level is controlled by Bit 05.
vector.
Mask Control Word. This word sets the mask control
Mode 3. (Bit Input/Output). Programming a register, allowing any unused bits to be masked off. If any
port for Mode 3 operation requires a control bits are to be masked, then 0 4 must be set. When 04 is set,
the next word written to the port must be a mask control
word, a vector (if interrupts are enabled), and word (Figure 10).
three additional words, described as follows:
Interrupt Disable. There is one other control
1/0 Register Control. When Mode 3 is selected, the mode word which can be used to enable or disable a
control word must be followed by another control word that
sets the I/O control register, which in turn defines which
port interrupt. It can be used without changing
port lines are inputs and which are outputs (Figure 8). the rest of the interrupt control word
(Figure II).
IT
IDr\o.IDSID.I' I, I ' I ' I
L,_.~_, CONTROL WORD
DON'T CARE
III L ::::::::,
=,
D. MASK WORD FOLLOWS
ro~
MODE SELECT Ds = 0 ACTIVE LEVEL IS LOW
Ds = 1 ACTIVE LEVEL IS HIGH
MODED
MODE' D8 = 0 INTERRUPT ON OR FUNCTION
MODE 2 ~ = , INTERRUPT ON AND FUNCTION
MODE 3
IDrI~\~I~I~I~I~lol IDrlo.l~I~I~I~I~IDeI
L IDENTIFIES INTERRUPT
VECTOR
I MBo-MB7 MASK BITS. A
BIT IS MONITORED FOR AN
I
L _ _ _ _ ~~~~O~PPLIED INTERRUPT
L .- - - - INTERRUPT IF IT IS
DEFINED AS AN INPUT AND
THE MASK BIT IS SET TO D.
IDrIDeI~I~I~I~I~IDeI
I D SETS BIT TO OUTPUT
, SETS BIT TO INPUT
1T
IDrIDeI~ID.1 0 I D I, 1'1
c= IDENTIFIES INTERRUPT
DISABLE WORD
DON'TCARE
Dr = 0 INTERRUPT DISABLE
07 = , INTERRUPT ENABLE
Figure 8. 1/0 Register Control Word Figure II. Interrupt Disable Word
20060318.0319.0320,0321.0322,0323
49
Pin Ao-A,. Port A Bus (bidirectional, 3-state). C/O. Control Or Data Select (input,
DeKrlptloD This a-bit bus transfers data, status, or control High = C). This pin defines the type of data
information between Port A of the PIO and a transfer to be performed between the CPU and
peripheral device. Ao is the least significant the PIa. A High on this pin during a CPU
bit of the Port A data bus. write to the PIa causes the Z-80 data bus to be
ARDY. Register A Ready (output, active interpreted as a command for the port selected
High). The meaning of this signal depends on by the BiA Select line. A Low on this pin
the mode of operation selected for Port A as means that the Z-80 data bus is being used to
follows: transfer data between the CPU and the PIa.
Often address bit A I from the CPU is used for
Output Mode. This signal goes active to indicate that the
this function.
Port A output register has been loaded and the peripheral
data bus is stable and ready for transfer to the peripheral CEo Chip Enable (input, active Low). A Low
device. on this pin enables the PIO to accept com-
Input Mode. This signal is active when the Port A input mand or data inputs from the CPU during a
register is empty and ready to accept data from the write cycle or to transmit data to the CPU dur-
peripheral device. ing a read cycle. This signai is generally
Bidirectional Mode. This signal is active when data is decoded from four I/O port numbers for Ports
available in the Port A output register for transfer to the A and B, data, and control.
peripheral device. In this mode, data is not placed on the
Port A data bus, unless ASTB is active. CLK. System Clock (input). The Z-80 PIO uses
Control Mode. This signal is disabled and forced to a Low the standard single-phase Z-80 system clock.
state. 00-0,. Z8G CPU Data Bus (bidirectional,
ASTB. Port A Strobe Pulse From Peripheral 3-state). This bus is used to transfer all data
Device (input, active Low). The meaning of and command~ between the 2-80 CPU and the
this signal depends on the mode of operation Z-80 PIa. Do is the least significant bit.
selected for Port A as follows: lEI. Interrupt Enable In (input, active High).
Output Mode. The positive edge of this strobe is issued by This signal is used to form a priority-interrupt
the peripheral to acknowledge the receipt of data made daisy chain when more than one interrupt-
available by the PIO.
driven device is being used. A High level on
Input Mode. The strobe is issued by the peripheral to load this pin indicates that no other devices of
data from the peripheral into the Port A input register.
higher priority are being serviced by a CPU
Data is loaded into the PIO when this signal is active.
interrupt service routine.
Bidirectional Mode. When this signal is active, data from
the Port A output register is gated onto the Port A bidirec- lEO. Interrupt Enable Out (output, active
tional data bus. The positive edge of the strobe acknowl- High). The lEO signal is the other signal
edges the receipt of the data. required to form a daisy chain priority scheme.
Control Mode. The strobe is inhibited internally. It is High only if lEI is High and the CPU is
80-1,. Port B Bus (bidirectional, 3-state). This not servicing an interrupt from this PIa. Thus
8-bit bus transfers data, status, or control this signal blocks lower priority devices from
information between Port B and a peripheral interrupting while a higher priority device is
device. The Port B data bus can supply being serviced by its CPU interrupt service
1.5 rnA at 1.5 V to drive Darlington transistors. routine.
Eo is the least Significant bit of the bus. INT. Interrupt Request (output, open drain,
B/X. Port B Or A Select (input, High = B). active Low). When INT is active the 2-80 PIa
This pin defines which port is accessed during is requesting an interrupt from the 2-80 CPU.
a data transfer between the CPU and the PIa. IORQ. Input/Output Request (input from 2-80
A Low on this pin seleds Port A; a High CPU, active Low). IORQ is used in conjunc-
selects Port B. Often address bit Ao from the tion with B/A, C/O, CE, and RD to transfer
CPU is used for this selection function. commands and data between the 2-80 CPU and
BRDY. Register B Ready (output, active High). the 2-80 PIa. When CE, RD, and IORQ are
This signal is similar to ARDY, except that in active, the port addressed by B/A transfers
the Port A bidirectional mode this signal is data to the CPU (a read operation). Con-
High when the Port A input register is empty versely, when CE and IORQ are active but RD
and ready to accept data from the peripheral is not, the port addressed by BiA Is written
into from the CPU with either data or control
device. , information, as speCified by C/O. Also, if
BSTB. Port B Strobe Pulse From Peripheral
10RQ and MI are active simultaneously, the
Device (input, active Low). This signal is
CPU is acknowledging an interrupt; the inter-
similar to ASTB, except that in· the Port A
rupting port automatically places its interrupt
bidirectional mode this signal strobes data
vector on the CPU data bus if it is the highest
from the peripheral device into the Port A
priority device requesting an interrupt.
input register.
50
Pin MI. Machine Cycle (input from CPU, active the PIa interrupt logic; when Ml occurs
Desc:rlptlon Low). This signal is used as a sync pulse to without an active RD or 10RQ Signal. the PIa
( Continued) control several internal PIa operations. When is. reset.
both the MI and RD signals are active, the RD. Read Cycle Status (input from 2-80 CPU,
2-80 CPU is fetching an instruction from active Low). If "Ro is active, or an 110 opera-
memory. Conversely, when both Ml and tion is in progress, RD is used with B/A, C/O,
10RQ are active, the CPU is acknowledging CE, and 10RQ to transfer data from the 2-80
an interrupt. In addition, MI has two other PIa to the 2-80 CPU.
functions within the 2-80 PIa: it synchronizes
CLK
PORT
OUTPUT ------J'----+-----f----I--
READY
Bidirectional Moel. (Mode 2). This is a com- If interrupts occur, Port A's vector will be used
bination of Modes 0 and I using all four hand- during port output and Port B's will be used
shake lines and the eight Port A 110 lines during port input. Data is allowed out onto the
(Figure 16). Port B must be set to the bit mode Port A bus only when ASTB is Low. The rising
and its inputs must be masked. The Port A edge of this strobe can be used to latch the
handshake lines are used for output control data into the peripheral.
and the Port B lines are used for input control.
eLK
ARDY
~RTA _____________________~~~~=>--------~
DATA BUS
BRDY
2006-0327. 0328
52
TlmlDg Bit Mode (Mode 3). The bit mode does not lines assigned as inputs. The input register
(Continued) utilize the handshake signals, and a normal contains data that was present immediately
port write or port read can be executed at any prior to the falling edge of RD. An interrupt is
time. When writing, the data is latched into generated if interrupts from the port are
the output registers with the same timing as the enabled and the data on the port data lines
output mode (Figure 17). satisfy the logical equation defined by the 8-bit
When reading the PIO, the data returned to mask and 2-bit mask control registers. How-
the CPU is composed of output register data ever, if Port A is programmed in bidirectional
from those port data lines assigned as outputs mode, Port B does not issue an interrupt in bit
and input register data from those port data mode and must therefore be polled.
eLK
I
"Timing Diagram Refers to Bit Mode Read ~ = 0 1 PLACED ON 8US
B
Figure 17. Mode 3 Bit Mode Timing
Return From Interrupt Cycle. If a Z-80 per- lEO Low. This device is the highest-priority
ipheral has no interrupt pending and is not device in the daisy chain that has received an
under service, then its lEO = lEI. If it has an interrupt acknowledge. All other peripherals
interrupt under service (Le., it has already have lEI = lEO. If the next opcode byte
interrupted and received an interrupt acknowl- decoded is "4D," this peripheral device resets
edge) then its lEO is always Low, inhibiting its "interrupt under service" condition.
lower priority devices from interrupting. If it
has an interrupt pending which has not yet
been acknowledged, lEO is Low unless an
"ED" is decoded as the first byte of a 2-byte
opcode (Figure 19). In this case, lEO goes
High until the next opcode byte is decoded,
whereupon it goes Low again. If the second
byte of the opcode was a "4D," then the
opcode was an RET I instruction.
After an "ED" opcode is decoded, only the
peripheral device which has interrupted and is
currently under service has its lEI High and its __________________ ~r____
Ci
8Ii,eli)
RD,IORQ -------------r-1~----_1----------------~~~~~~---------+-------------
Do-
D7{OUT
IN
lEi
lEO
READY
IARDY OR aROY,
iiiiiiii
(iiii OR UTa.
IIODEO
MODE 1
IIODE2
IIODE3
2006-0332
54
Z-8O PlO Z-8OA PlO Z-80B Pl0I9)
lila Max MID Max MID Max
N~ Symbol Parameter (as)- (as) (as) (as) (-) (as) Comment
TcC Clock Cycle Time 400 [I) 250 [1) 165 [I)
2 TwCh Clock Width (High) 170 2000 105 2000 65 2000
3 TwCI Clock Width (Low) 170 2000 105 2000 65 2000
4 TfC Clock Fall Time 30 30 20
5-TrC Clock Rise Time 30 30 20
6 TsCS(RI) CE, BiA, cm
to RD,
IORO I Setup Time 50 50 50 [6)
7 Th Any Hold Times for Specified
Setup Time 0 0 0 0
8 TsRI(C) RD, IORO to Clock f Setup
Time 115 115 70
9 - TdRI(OO)-- RD, IORO Ito Data Out Delay 430 380 300 [2)--
10 RD, IORO t to Data Out Float
TdRI(DOs)
Delay 160 110 70
N
11 TsDI(C) Data In to Clock t Setup Time 50 50 40 CL = 50 pF •
•..
0
12 TdIO(DOI) IORQ I to Data Out Delay
(INTACK Cycle) 340 160 120 [3)
13- TsMl(Cr)-- MI I to Clock t Setup Time-- 210 90 70
0
14 TsMl(Cf) MI--Lto Clock I Setup Time
(MI Cycle) 0 0 0 [8)
IS TdMI(IEO) MI I to lEO I Delay (Interrupt
Immediately Preceding MI I) 300 190 100 [5,7)
16 TsIEI(IO) lEI to IORO I Setup Time
(INTACK Cycle) 140 140 100 [7)
17 - TdIEI(IEOf)- lEI I to lEO I Delay 190 130 120 [5)--
CL = 50 pF
18 TdIEI(IEOr) lEI t to lEO t Delay (after ED
Decode) 210 160 160 [5)
19 TcIO(C) IORQ t to Clock I Setup Time
(To Activate READY on Next
Clock Cycle) 220 290 170
20-TdC(RDYr)- Clock I to READY t Delay---200 190 170 [5)--
CL = 50 pF
21 TdC(RDYf) Clock I to READY t Delay 150 140 120 [5)
22 TwSTB ""STROBE Pulse Width 150 150 120 [4)
23 TsSTB(C) ~ t to Clock I Setup
Time (To Activate READY on
Next Clock Cycle) 220 220 150 [5)
24 -TdIO(PD)-- IORQ t to PORT DATA Stable
Delay (Mode 0) 200 180 160 (5)
25 TsPD(STB) PORT DATA to ~ t
Setup Time (Mode I) 260 230 190
26 TdSTB(PD) STROBE I to PORT DATA
Stable (Mode 2) 230 210 180 [5)
27 -TdSTB(PDr)-STROBE I to PORT DATA Float
Delay (Mode 2) 200 180 160 CL = 50 pF
28 TdPD(INT) PORT DATA Match to INT I
Delay (Mode 3) 540 490 430
29 TdSTB(lNT) ~ I to 1Nf I Delay 490 440 350
55
Absolute Voltages on all inputs and outputs Stresses greater than those listed under Absolute Maxi-
Maximum with respect to GND .......... -0.3 V to + 7.0 V mum Ratings may cause permanent damage to the device.
This is a stress rating only; operation of the device at any
Ratings Operating Ambient condition above those indicated in the operational sections
Temperature ................. As Specified in of these specifications is not implied. Exposure to absolute
Ordering Information maximum rating conditions for extended periods may affect
device reliability.
Storage Temperature ........ -65°C to + 150 °C
Test The characteristics below apply for the Ordering Information section.
Conditions follOWing standard test conditions, unless All ac parameters assume a load capacitance
otherwise noted. All voltages are referenced to of 100 pF max. Timing references between two
GND (0 V). Positive current flows into the output signals assume a load difference of
referenced pin. Available operating 50 pF max.
temperature ranges are:
.IV
• 0° to + 70°C,
+4.75 V $ Vee $ +5.25 V 2.1K
• -40°C to +85°C,
+4.75 V $ Vee $ +5.25 V
• -55° to + 125°C,
+4.75 V $ Vee $ +5.5 V
The product number for each operating
temperature range may be found in the
C8085UUUb
56
11.3 Appendex C - Z8~A CTC ••••••••••••••••••
18430
zaer eTC Coa.terl
""er Clreult
Prodact
SpecUlcatloD
March 1981
General The Z-80 eTC four-channel counter/timer each channel is programmed with two bytes; a
Description can be programmed by system software for a third is necessary when interrupts are enabled.
broad range of counting and timing applica- Once started, the eTC counts down, reloads
tions. The four independently programmable its time constant automatically, and resumes
channels of the Z-80 eTC satisfy common counting. Software timing loops are completely
microcomputer !;ystem requirements for event eliminated. Interrupt processing is Simplified
counting, interrupt and interval timing, and because only one vector need be speCified; the
general clock rate generation. eTC internally generates a unique vector for
System design is Simplified because the eTC each channel.
connects directly to both the Z-80 CPU and the The Z-80 CTC requires a single + 5 V power
Z-80 SIO with no additional logic. In larger supply and the standard Z-80 single-phase
systems, address decoders and buffers may be system clock. It is fabricated with n-channel
required. silicon-gate depletion-load technology, and
Programming the CTe is straightforward: packaged in a 28-pin plastic or ceramic DIP.
DATA O. 28 1>3
CPU!
BUS CHAIlIlau. Os 27 0,
SIGNALS
De 28 0,
0, 25 Do
GND 24 +5V
RD 23 ClKITAGo
CTC {
COIlTROL
ZClTOo
ZClTO,
C::C
Z~~OA 22
21
ClKITAG,
ClKITAG,
PROM
CPU ZClTo" 20 ClKITAG.
IORO 10 19 CS,
lEO 11 18 CSo
DAISY { iiiT 12 17 REffi
CHAIII lEO
IIiTURUPT lEI 13 18 CE
COIITROL iiiT
ii1 14 15 ClK
f f f
CLK +5 V GNO
20410154,0155 59
FUDCt10Dal The Z-80 CTC has four independent counterl a preset down-counter.
Description timer channels. Each channel is individually Thus, the time interval is an integral mul-
programmed with two words: a control word tiple of the clock period, the prescaler value
and a time-constant word. The control word (16 or 256) and the time constant that is preset
selects the operating mode (counter or timer), in the down-counter. A timer is triggered auto-
enables or disables the channel interrupt, and matically when its time constant value is pro-
selects certain other operating parameters. If grammed, or by an external CLKlTRG input.
the timing mode is selected, the control word Three channels have two outputs that occUr
also sets a prescaler, which divides the system at zero count. The first output is a zero-
clock by either 16 or 256. The time-constant count/timeout pulse at the ZC/TO output. The
word is a value from 1 to 256. fourth channel (Channel 3) does not have a
During operation, the individual courtter ZC/TO output; interrupt request is the only
channel counts down from the preset time con- output available from Channel 3.
stant value. In counter mode operation the The second output is Interrupt Request
counter decrements on each of the CLKlTRG (INT), which occurs if the channel has its
input pulses until zero count is reached. Each interrupt enabled during programming. When
decrement is synchronized by the system the Z-80 CPU acknowledges Interrupt Request,
clock. For counts greater than 256, more than the Z-80 CTC places an interrupt vector on the
one counter can be cascaded. At zero count, data bus.
the down-counter is automatically reset with The four channels of the Z-80 CTC are fully
the time constant value. prioritized and fit into four contiguous slots in
The timer mode determines time intervals as a standard Z-80 daisy-chain interrupt struc-
small as 4 p.s (Z-80A) or 6.4 p.s (Z-80) without ture. Channel 0 is the highest priority and
additional logic or software timing loops. Time Channel 3 the lowest. Interrupts can be
intervals are generated by dividing the system individually enabled (or disabled) for each of
clock with a prescaler that decrements the four channels.
Architecture The CTC has four major elements, as shown Intemal Control Logic. The CTC internal
in Figure 3. control logic controls overall chip operating
functions such as the chip enable, reset, and
• CPU bus I/O
• Channel control logic read/write logic.
• Interrupt logic Interrupt Logic. The interrupt control logic
• Counterltimer circuits ensures that the CTC interrupts interface prop-
CPU Bus 110. The CPU bus I/O circuit erly with the Z-80 CPU interrupt system. The
decodes the address inputs, and interfaces the logic controls the interrupt priority of the CTC
CPU data and control signals to the CTC for as a function of the lEI signal. If lEI is High,
distribution on the internal bus. the CTC has priority. During interrupt
DATA iNT
PROM lEI
Z80CPU
{ lEO
CONTROL
lCITO
CLKlTRQ
2041·0157
60
ArehlteCture processing, the interrupt logic holds lEO Low, the control word and sets the following
(Continued) which inhibits the interrupt operation on lower operating conditions:
priority devices. If the lEI input goes Low~ • Interrupt enable (or disable)
priority is relinquished and the interrupt logic • Operating mode (timer or counter)
drives lEO Low. • Timer mode prescaler factor (16 or 256)
If a channel is programmed to request an • Active slope for CLKITRG input
interrupt, the interrupt logic drives lEO Low at • Timer mode trigger (automatic or CLKlTRG
the zero count, and generates an INT signal to input)
the Z-BO CPU. When the Z-BO CPU responds • Time constant data word to follow
with interrupt acknowledge (Ml and IORQ),
• Software reset
then the interrupt logic arbitrates the CTC
internal priorities, and the interrupt control Time CoDStant Register. When the counter/
logic places a unique interrupt vector on the timer channel is programmed, the time con-
data bus. stant register receives and stores an 8-bit time
H an interrupt is pending, the interrupt logic constant value, which can be anywhere from 1
holds lEO Low. When the Z-BO CPU issues a to 256 (0 = 256). This constant is automatic-
Return From Interrupt (RETn instruction, each ally loaded into the down-counter when the
peripheral device decodes the first byte counter/timer channel is initialized, and subse-
quently after each zero count.
(EDI6). If the device has a pending interrupt,
it raises lEO (High) for one Ml cycle. This Prescaler. The prescaler, which is used only I
ensures that all lower priority devices can
decode the entire RETI instruction and reset
properly.
in timer mode, divides the system clock fre-
quency by a factor of either 16 or 256. The
prescaler output clocks the down-counter dur-
a
ing timer operation. The effect of the prescaler
on the down-counter is a multiplication of the
system clock period by 16 or 256. The pre-
scaler factor is programmed by bit 5 of the
channel control word.
Down-Counter. Prior to each count cycle, the
down-counter is loaded with the time constant
register contents. The counter is then
decremented one of two ways, depending on
ZClTO operating mode:
• By the prescaler output (timer mode)
• By the trigger pulses into the CLKITRG
input (counter mode)
Without disturbing the down-count, the Z-80
Figure 4. Counter/Timer Block Diagram CPU can read the count remaining at any time
by performing an I/O read operation at the
Counter/Timer Circuits. The eTe has four port address assigned to the CTC channel.
independent counter/timer circuits, each con- When the down-counter reaches the zero
taining the logic shown in Figure 4. count, the Ze/TO output generates a positive-
Channel Control Logic. The channel control going pulse. When the interrupt is enabled,
logic receives the 8- bit channel control word zero count also triggers an interrupt request
when the counter/timer channel is pro- signal (lNT) from the interrupt logiC.
grammed. The channel control logic decodes
/()41 IJI'i" 61
Programming Each Z-80 eTC channel must be pro- 00-07 go to the high-impedance state. All
grammed prior to operation. Programming channels must be completely reprogramJIled
consists of writing two words to the 110 port after a hardware reset.
that corresponds to the desired channel. The The software reset is controlled by bit I in
first word is a control word that selects the the channel control word. When a channel
operating mode and other parameters; the receives a software reset, it stops counting.
second word is a time constant, which is a When a software reset is used, the other bits in
binary data word with a value from 1 to 256. A the control word also change the contents of
time constant word must be preceded by a the channel control register. After a software
channel control word. reset a new time constant word must be written
After initialization, channels may be to the same channel.
reprogrammed at any time. If updated control If the channel control word has both bits Dl
and time constant words are written to a chan- and 02 set to 1, the addressed channel stops
nel during the count operation, the count con- operating, pending a new time constant word.
tinues to zero before the new tilne constant is The channel is ready to resume after the new
loaded into the counter. constant is programmed. In timer mode, if
If the interrupt on any Z-80 CTC channel is 0 3 = 0, operation is triggered automatically
enabled, the programming procedure should when the time constant word is loaded.
also include an interrupt vector. Only one vec- Channel Control Word Programming. The
tor is required for all four channels, because channel control word is shown in Figure 5. It
the interrupt logic automatically modifies the sets the modes and parameters described
vector for the channel requesting service. below.
A control word is identified by a 1 in bit O.
A 0 in bit 2 indicates a time constant word is to Interrupt Enable. D7 enables the interrupt, so
follow. Interrupt vectors are always addressed that an interrupt output (INT) is generated at
to Channel 0, and identified by a 0 in bit O. zero count. Interrupts may be programmed in
either mode and may be enabled or disabled
Addressing. During programming, channels at any time.
are addressed with the channel select pins CSI
and CS2. A 2-bit binary code selects the Operating Mode. 06 selects either timer or
appropriate channel as shown in the following counter mode.
table. Prescaler Factor. (Timer Mode Only). D5
Channel CSI CSo selects factor-either 16 or 256.
Trigger Slope. 0 4 selects the active edge or
000 slope of the CLK/TRG input pulses. Note that
1 0 1 reprogramming the CLK/TRG slope during
2 1 0 operation is equivalent to issuing an active
3 1 1 edge. If the trigger slope is changed by a con-
Reset. The CTC has both hardware and soft- trol word update while a channel is pending
ware resets. The hardware reset terminates all operation in timer mode, the result is the same
down-counts and disables all CTC interrupts as a CLK/TR G pulse and the timer starts.
by resetting the interrupt bits in the control Similarly, if the channel is in counter mode,
registers. In addition, the ZC/TO and Interrupt the counter decrements.
outputs go inactive, lEO reflects lEI, and
~
J L
o
IIITERRUPT
1 ENABLES INTERRUPT
o DISABLES INTERRUPT
MODE
SELECTS TIMER MODE
1 SELECTS COUNTER MODE
J .
COIITROL OR VECTOR
0= VECTOR
1 = CONTROL WORD
RESET
o = CONTINUED OPERATION
1 = SOFTWARE RESET
PRESCALER VALUE" TIME COIISTAIIT
1 = VALUE OF 256 o= NO TIME CONSTANT FOLLOWS
o = VALUE OF 16 1 = TIME CONSTANT FOLLOWS
2041-0159
62
Programming Trigger Mode (Timer Mode Only). D3 selects Software Reset. Setting DJ to 1 causes a soft-
(Continued) the trigger mode for timer operation. When D3 ware reset, which is described in the Reset
is reset to 0, the timer is triggered automatic- section.
ally. The time constant word is programmed Control Word. Setting Do to 1 identifies the
during an I/O write operation, which takes one word as a control word.
machine cycle. At the end of the write opera-
tion there is a setup delay of one clock period. Time Constant Programming. Before a chan-
The timer starts automatically (decrements) on nel can start counting it must receive a time
the rising edge of the second clock pulse (T2) constant word from the CPU. During program-
of the machine cycle following the write opera- ming or reprogramming, a channel control
tion. Once started, the timer runs contin- word in which bit 2 is set must precede the
uously. At zero count the timer reloads time constant word to indicate that the next
automatically and continues counting without word is a time constant. The time constant
interruption or delay, until stopped by a reset. word can be any value from 1 to 256 (Figure
When D3 is set to 1, the timer is triggered 6). Note that 0016 is interpreted as 256.
externally through the CLK/TRG input. The In timer mode, the time interval is controlled
time constant word is programmed during an by three factors:
1/0 write operation, which takes one machine • The system clock period (¢)
cycle. The timer is ready for operation on the
rising edge of the second clock pulse (T 2) of
the following machine cycle. Note that the first
• The prescaler factor (P), which multiplies
the interval by either 16 or 256 I
timer decrement follows the active edge of the
CLK/TRG pulse by a delay time of one clock
• The time constant (T), which is programmed
into the time constant register 9
cycle if a minimum setup time to the rising Consequently, the time interval is the pro-
edge of clock is met. If this minimum is not duct of ¢ x P x T. The minimum timer resolu-
met, the delay is extended by another clock tion is 16 x ¢ (4 p.s with a 4 MHz clock). The
period. Consequently, for immediate trigger- maximum timer interval is 256 x ¢x 256 (16.4 ms
ing, the CLK/TRG input must precede T2 by with a 4 MHz clock). For longer intervals
one clock cycle plus its minimum setup time. If timers may be cascaded.
the minimum time is not met, the timer will
Interrupt Vector Programming. If the 2-80
start on the third clock cycle (T3)'
CTC has one or more interrupts enabled, it
Once started the timer operates contin-
can supply interrupt vectors to the 2-80 CPU.
uously, without interruption or delay, until
To do so, the 2-80 CTC must be pre-pro-
stopped by a reset.
grammed with the most-significant five bits of
Time Constant to Follow. A I in D2 indicates the interrupt vector. Programming consists of
that the next word addressed to the selected writing a vector word to the I/O port cor-
channel is a time constant data word for the responding to the 2-80 CTC Channel O. Note
time constant register. The time constant word that Do of the vector word is always zero, to
may be written at any time. distinguish the vector from a channel control
A 0 in D2 indicates no time constant word is word. DJ and D2 are not used in programming
to follow. This is ordinarily used when the the vector word. These bits are supplied by
channel is already in operation and the new the interrupt logic to identify the channel
channel control word is an update. A channel requesting interrupt service with a unique
will not operate without a time constant value. interrupt vector (Figure 7). Channel 0 has the
The only way to write a time constant value is highest priority.
to write a control word with D2 set.
:~:TC'~
TC.
~~I ~~ :~: LTC2
rCa
V7-V.=oJ
SUPPLIED
BY USER
L 0
1
= INTERRUPT VECTOR WORD
= CONTROL WORD
CHANNEL IDENTIFIER
«AUTOMATICALLY INSERTED
BY CTC)
o 0 = CHANNEL 0
o 1 =CHANNEL 1
1 0 = CHANNEL 2
1 1 = CHANNEL 3
2041·0156
64
Timing Read Cycle Timing. Figure 9 shows read latched into the appropriate register with the
cycle timing. This cycle reads the contents of a rising edge of clock cycle TWA. No additional
down-counter without disturbing the count. wait states are allowed.
During clock cycle T2, the Z-80 CPU initiates a
read cycle by driving the following inputs
Low: RD, IORQ, and CE. A 2-bit binary code
at inputs CSI and CSo selects the channel to CLKlTRG
be read. Ml must be High to distinguish this
cycle from an interrupt acknowledge. No addi- IIIT8RIIAL
tional wait states are allowed. T......
CSo. CS1. Ci ==:::x: CHANNEL ADDRESS x::= Timer Operation. In the timer mode, a
CLKlTRG pulse input starts the timer (Figure
._1 --7"--------------
,
_.t
edge of the CLK/TRG and the next rising edge
of CLK to enable the prescaler on the follow-
ing clock edge. If the CLK/TRG edge occurs
DATA----------< closer than this, the initiation of the timer
function is delayed one clock cycle. This cor-
Figure 9. Read Cycle Timing' responds to the startup timing discussed in the
programming section. The timer can also be
Write Cycle Timing. Figure 10 shows write started automatically if so programmed by the
cycle timing for loading control, time constant channel control word.
or vector words.
The CTC does not have a write signal input,
so it generates one internally when the read
(RD) input is High during TI. During T2 CLKITRG
IORQ and CE inputs are Low. Ml must be
High to distingUish a write cycle from an inter- INTERNAL
COUNTER _ _ _--'I
rupt acknowledge. A 2-bit binary code at
inputs CSI and CSo selects the channel to be ZCITO _ _ _ _ _- - '
addressed, and the word being written is
placed on the Z-80 data bus. The data word is
Figure 12. Counter Mod. Timing'
65
Interrupt The 2-80 CTC follows the 2-80 system inter- were written to the CTC during the program-
Operation rupt protocol for nested priority interrupts and ming process; the next two bits are provided
return from interrupt, wherein the interrupt by the CTC interrupt control logic as a binary
priority of a peripheral is determined by its code that identifies the highest priority chan-
location in a daisy chain. Two lines-lEI and nel requesting an interrupt; the low-order bit
lEO-in the CTC connect it to the system daisy is always zero.
chain. The device closest to the + 5 V supply Interrupt Acknowledge Timing. Figure 14
has the highest priority (Figure 13). For addi-
shows interrupt acknowledge timing. After an
tional information on the 2-80 interrupt struc-
interrupt request, the 2-80 CPU sends an inter-
ture, refer to the Z-80 CPU Product Specifica-
rupt acknowledge (Ml and IORQ). All chan-
tion and the Z-80 CPU Technical Manual.
nels are inhibited from changing their inter-
HIGHU' PRIORITY lOWES' PRIORITY rupt request status when Ml is active-about
DEVICE DEVICE
two clock cycles earlier than IORQ. RD is
High to distinguish this cycle from an instruc-
tion fetch.
The CTC interrupt logic determines the
highest priority channel requesting an inter-
Figure 13. Datsy-ChalD IDtenupt Prloritl.. rupt. If the CTC interrupt enable input (lEI) is
High, the highest priority interrupting channel
Within the 2-80 CTC, interrupt priority is
within the CTC places its interrupt vector on
predetermined by channel number: Channel 0
the data bus when IORQ goes Low. Two wait
has the highest priority, and Channel 3 the
states (TWA) are automatically inserted at this
lowest. If a device or channel is being serviced
time to allow the daisy chain to stabilize. Addi-
with an interrupt routine, it cannot be inter-
tional wait states may be added.
rupted by a device or channel with lower
priority until service is complete. Higher Return &om Interrupt Timing. At the end of
priority devices or channels may interrupt the an interrupt service routine the RETI (Return
servicing of lower priority devkes or channels. From Interrupt) instruction initializes the daisy
A 2-80 CTC channel may be programmed to chain enable lines for proper control of nested
request an interrupt every time its down- priority interrupt handling. The CTC decodes
counter reaches zero. Note that the CPU must the 2-byte RET! code internally and determines
be programmed for interrupt mode 2. Some whether it is intended for a channel being ser-
time after the interrupt request, the CPU sends viced. Figure 15 shows RETI timing.
an interrupt acknowledge. The CTC interrupt If several 2-80 peripherals are in the daisy
control logic determines the highest priority chain, lEI settles active (High) on the chip
channel that is requesting an interrupt. Then, currently being serviced when the opcode
if the CTC lEI input is High (indicating that it ED16 is decoded. If the follOWing opcode is
has priority within the system daisy chain) it 4D16, the peripheral being serviced is released
places an 8-bit interrupt vector on the system and its lEO becomes active. Additional wait
data bus. The high-order five bits of this vector states are allowed.
ClK elK
1.1:::::::.1 IE
_I_-_
-_--
_ -_
- J ,
2041-0166,0167,0168
66
11.4 Appendex D - Floppy Disk controller ••••
GENERAL DESCRIPTION
The FD179X are MaS LSI devices which perform the control is identical. In each case. the actual· pin as-
functions of a Floppy Disk Formatter/Controller in sigMlents vary by only a few pins from any one to
a single chip implementation. The FD179X. which another.
can be considered the end result of both the FD1n1
The processor interface consists of an 8-bit bi-
and FD1781 designs. is IBM 3740 compatible in
directional bus for data. status. and control word
single density mode (FM) and System 34 compatible
transfers. The FD179X is set up to operate on a mul-
in Double Density Mode (MFM). The FD179X con-
tiplexed bus with other bus-oriented devices.
tains all the features of its predecessor the FD1n1.
plus the added features necessary to read/write and The FD179X is fabricated in N-channef Sificon Gate
format a double density diskette. These include ad- MOS technology and is TTL compatible on all inputs
dress mark detection. FM and MFM encode and de- and outputs. The 1793 is identical to the 1791 except
code logic. window extension. and write precompen- the DAL lines are TRUE for systems that utifize true
sation. In order to maintain compatibility. the FD1n1. data busses.
FD1781. and FD179X designs were made as close as The 179517 has a side select output for controlling dou-
possible with the computer interface. instruction set. ble sided drives. and the 1792 and 1794 are "Single
and I/O registers being identical. Also. head load Density Only" versions of the 1791 and 1793. On these
devices. DDEN must be left open.
PIN OUTS
PIN
NUMBER PIN NAME SYMBOL FUNCTION
1 NO CONNECTION NC Pin 1 is internally connected to a back bias
generator and must be left open by the user.
19 MASTER RESET MR A logic low on this input resets the device and
loads HEX 03 into the command register. The Not
Ready ~atus Bit 7) is reset during MR ACTIVE.
When MR is brought to a logic high a RESTORE
Command is executed, regardless of the state of
the Ready signal from the drive. Also, HEX 01 is
loaded into sector register.
20 POWER SUPPLIES Vss Ground
21 Vee +5V ±5%
40 Voo +12V ±5%
COMPUTER INTERFACE:
2 WRITE ENABLE WE A logic low on this input gate~ata on the DAL
into the selected register when CS is low.
3 CHIP SELECT CS A logic low on this input selects the chip and ena-
bles computer communication with the device.
4 READ ENABLE RE A logic low on this input controls the placement of
data from a selected register on the DAl when CS
is low.
5,6 REGISTER SELECT AO, A1 These inputs select the register !!L receivel
LINES transfer data on the DAl lines under RE and WE
control:
A1 AO RE WE
0 0 Status Reg Command Reg
0 1 Track Reg Track Reg
1 0 Sector Reg Sector Reg
1 1 Data Reg Data Reg
7-14 DATA ACCESS LINES DALC-DAL7 Eight bit inverted Bidirectional bus used for trans-
fer of data, control, and status. This bus is receiver
enabled by WE or transmitter enabled by RE.
39 INTERRUPT INTRQ This open drain output is set at the completion of any
REQUEST command and is reset when the STATUS register is
read or the command register is written to. Use 10K
FLOPPY DISK INTERFACE: pull-up resistor to +5.
15 STEP STEP The step output contains a pulse for each step.
16 DIRECTION DIRC Direction Output is active high when stepping in.
active low when stepping out.
17 EARLY EARLY Indicates that the WRITE DATA pulse occurring
while Early is active (high) should be shifted early
for write precompensation.
18 LATE LATE Indicates that the write data pulse occurring while
late is active (high) should be shifted late for write
precompensation.
22 TEST TEST This input is used for testing purposes only and
should be tied to +5V or left open by the user un-
less interfacing to voice coil actuated motors.
23 HEAD LOAD TIMING HLT When a logic high is found on the HlT input the
head is assumed to be engaged.
25 READ GATE (1791/3) RG A high level on this output indicates to the data
separator circuitry that a field of zeros (or ones)
has been encountered. and is used for synchroni-
zation.
25 SIDE SELECT OUTPUT sse The logic level of the Side Select Output is directly
(1795. 1797) controlled by the 'S' flag in Type II or III commands.
When S = 1. SSO is set to a logic 1. When S = 0,
SSO is set to a logic O. The Side Select Otjput is only
updated at the beginning of a Type II or III command.
It is forced to a logic 0 upon a MASTER RESET
condition.
26 READ CLOCK RClK A nominal square-wave clock signal derived from
the data stream must be provided to this input.
Phasing (i.e. RClK transitions) relative to RAW
READ is important but polarity (RClK high or low)
is not.
27 RAW READ RAW READ The data input signal directly from the drive. This
input shall be a negative pulse for each recorded
flux transition.
28 HEAD LOAD HLD The HLD output controls the loading of the
Read-Write head against the media.
29 TRACK GREATER TG43 This output informs·the drive that the ReadlWrite
THAN 43 head is positioned between tracks 44-76. This output
is valid only during Read and Write Commands.
WRITE GATE WG This output is made valid before writing is to be
performed on the diskette.
-
PIN
NUMBER PIN NAME SYMBOL FUNCTION
ORGANIZATION
The Floppy Disk Formatter block diagram is illus- When executing the Seek command the Data Regis-
trated on page 5. The primary sections include the ter holds the address of the desired Track position.
parallel processor interface and the Floppy Disk inter- This register is loaded from the DAL and gated onto
face . . the DAL under processor control.
Data Shift Register-This a-bit register assembles Track Register-This a-bit register holds the track
serial data from the Read Data input (RAW READ) number of the current ReadIWrite head position. It is
during Read operations and transfers serial data to incremented by one every time the head is stepped in
the Write Data output during Write operations. (towards track 76) and decremented by one when the
Data Register-This a-bit register is used as a hold- head is stepped out (towards track (0). The contents
ing register during Disk Read and Write operations. of the register are compared with the recorded track
In Disk Read operations the assembled data byte is number in the 10 field during disk Read, Write, and
transferred in parallel to the Data Register from the Verify operations. The Track Register can be loaded
Data Shift Register. In Disk Write operations informa- from or transferred to the DAL. This Register should
tion is transferred in parallel from the Data Register not be loaded when the device is busy.
to the Data Shift Register.
=!--
~
--- I~'AO
~--
CouPU'EA d ...
INTERlACE 1~'ERf.""':f
Co...'AOl CONTRe..:.
Sector Aeglster (SR)-This 8-bit register holds the The CRC includes all information starting with the
address of the desired sector position. The contents address mark and up to the CRC characters. The
of the register are compared with the recorded sector CRC register is preset to ones prior to data being
number in the 10 field during disk Read or Write 0p- shifted through the circuit.
erations. The Sector Register contents can be loaded
from or transferred to the OAL. This register should Arithmetic/Logic Unit (ALU)-The ALU is a serial
not be loaded when the device is busy. comparator, incrementer, and decrementer and is
used for register modification and comparisons with
Command Aeglster (CR)-This 8-bit register holds
the command presently being executed. This register the disk recorded 10 field.
should not be loaded when the device is busy unless nmlng and Control-All computer and Floppy Disk
the new command is a force interrupt. The command Interface controls are generated through this logic.
register can be loaded from the OAL, but not read The internal device timing is generated from an ex-
onto the OAL. ternal crystal clock.
Status Aeglster (STR)-This 8-bit register holds de-
vice Status information. The meaning of the Status
The F01791/3 has two different modes of~ation
according to the state of DOEN. When ODEN 0 =
bits is a function of the type of command previously
executed. This register can be read onto the OAL,
double density (MFM) is assumed. When r:mEN 1, =
single density (FM) is assumed.
but not loaded from the OAL.
CRC Logic-This logic is used to check or to gener- AM Detector-The address mark detector detects
ate the 16-bit Cyclic Redundancy Check (CRC). The 10, data and index address marks during read and
polynomialis:G(x) = x 16 + X12 + X S + 1. write operations.
335
PROCESSOR INTERFACE HEAD POSITIONING
The interface to the processor is accomplished Five commands cause positioning of the Read-Write
through the eight Data Access Unes (DAL) and as- head (see Command Section). The period of each
sociated control signals. The DAr are used to trans- positioning step is specified by the r field in bits 1 and
fer Data. Status. and Control words out of. or into the o of the command word. After the last directional
FD179X. The DAL are three state buffers that are en- step an additional 15 milliseconds of head settling
abled as output drivers when Chip Select (CS) and time takes place if the Verify flag is set in Type I
Read Enable (RE) are active (low lOgic state) or act commands. Note that this time doubles to 30 ms for
as input receivers when CS and Write Enable (WE) =
a 1 MHz clock. If Tm 0, there is zero settling
are active. time. There is also a 15 ms head settling time if the E
flag is set in any Type" or '" command.
When transfer of data with the Floppy Disk Controller
is required by the host processor. the device address The rates (shown in Table 1) can be applied to a
is decoded and CS is made low. The address bits A1
Step-Direction Motor through the device interface.
and AO. combined with the signals RE during a Read
operation or WE during a Write operation are inter- Step-A 2 ILs (MFM) or 4 ILS (FM) pulse is provided
preted. as selecting the following registers: as an output to the drive. For every step pulse is-
A1-AO READ (RE) WRITE (WE) sued. the drive moves one track location in a direc-
o 0 Status Register Command Register tion determined by the direction output.
o Track Register Track Register Direction (DlRC)-The Direction signal is active high
o Sector Register Sector Register when stepping in and low when stepping out. The Di-
Data Register Data Register rection signal is valid 12 ILS before the first stepping
pulse is generated.
During Direct Memory Access (DMA) types of data
transfers between the Data Register of the FD179X When a Seek. Step or Restore command is executed
and the processor. the Data Request (ORO) output is an optional verification of Read-Write head position
used in Data Transfer control. This signal also ap-
pears as status bit 1 during Read and Write opera-
can be performed by setting bit 2 (V =
1) in the
command word to a logic 1. The verification operation
tions. begins at the end of the 15 millisecond settling time
On Disk Read operations the Data Request is acti- after the head is loaded against the media. The track
vated (set high) when an assembled serial input byte number from the first encountered 10 Field is com-
is transferred in parallel to the Data Register. This bit pared against the contents of the Track Register. If
is cleared when the Data Register is read by the pro- the track numbers compare and the 10 Field Cyclic
cessor. If the Data Register is read after one or more Redundancy Check (CRC) is correct, the verify oper-
characters are lost. by having new data transferred ation is complete and an INTRO is generated with no
into the register prior to processor readout. the Lost errors. The FD179X must find an 10 field with correct
Data bit is set in the Status Register. The Read op- track number and correct CRC within 5 revolutions of
eration continues until the end of sector is reached. the media; otherwise the seek error is set and an
On Disk Write operations the data Request is acti- INTRO is generated.
vated when the Data Register transfers its contents
to the Data Shift Register. and requires a new data Table 1. STEPPING RATES
byte. It is reset when the Data Register is loaded
with new data by the processor. If new data is not
CLk 2 MHz 2 MHz 1 MHz 1 MHz 2 MHz 1 MHz
loaded at the time the next serial byte is required by
the Floppy 9isk. a byte of zeroes is written on the i50EN
diskette and the Lost Data bit is set in the Status Re- A1 AO TEST=1 TEST=1 TEST =1 TEST=l TEsT=O TEST=O
gister.
0 0 3 ms 3 ms 6 ms 6 ms 184,..5 368"s
At the completion of every command an INTRO is
0 1 6 ms 6 ms 12 ms 12 ms lOOpS 380,.5
generated. INTRO is reset by either reading the
status register or by loading the command register 1 0 10 ms 10 ms 20 ms 20 ms 198p5 396,,5
with a new command. In addition. INTRO is gener- 1 1 15 ms 15 m5 30 ms 30ms 208,.s 41&,.5
ated if a Force Interrupt command condition is met.
FLOPPY DISK INTERFACE The Head Load (HLD) output controls the movement
The 179X has two modes of ~ation according to the of the read/write head against the media. HlD is ac-
state of DDEFJ (Pin 37). When 0DEfiI = 1. single density tivated at the beginning of a Type I command if the h
is selected. In either case. the eLK input (Pin 24) is at =
flag is set (h 1). at the end of the Type I command
2 MHz. However. when interfacing with the mini-floppy, if the verify flag (V = 1), or upon receipt of any Type
the ClK input is set at 1 MHz for both single density and " or '" command. Once HLD is active it remains ac-
double density. When the clock is at 2 MHz, the stepping tive until either a Type I command is received with
rates of 3,6, 10, and 15 ms are obtainable. When ClK (h = 0 and V = 0); or if the FD179X is in an idle state
equals 1 .MHz these times are doubled. (non-busy) and 15 index pulses have occurred.
336
Head Load Timing (HLT) is an input to the FD179X derived externally by Phase lock loops, one shots, or
which is used for the head engage time. When counter techniques. In addition, a Read Gate Signal
HLT = 1, the FD179X assumes the head is com- is provided as an output (Pin 25) which can be used
pletely engaged. The head engage time is typically to inform phase lock loops when to acquire syn-
30 to 100 ms depending on drive. The low to high chronization. When reading from the media in FM. RG
transition on HLD is typically used to fire a,.pne shot. is made true when 2 bytes of zeroes are detected.
The output of the one shot is then used for HLT and The FD179X must find an address mark within the
supplied as an input to the FD179X. next 10 bytes; otherwise RG is reset and the search
for 2 bytes of zeroes begins all over again. H an ad-
dress mark is found within 10 bytes, RG remains true
as long as the FD179X is deriving any useful informa-
HLO~ 1---5010 l00mS~r-_ _ _ __
tion from the data stream. Similarfy for MFM, RG is
made active when 4 bytes of "00" or "FF" are de-
337
Whenever a Read or Write command (Type II or III) Table 4 FLAG SUMMARY
is received the FD179X samples the Ready input. "
this input is logic low the command is not executed TYPE II & III COMMANDS
and an interrupt is generated. All Type I commands m = Multiple Record flag (Bit 4)
are performed regardless of the state of the Ready m = O. Single Record
input. Also. whenever a Type II or III command is re-
m = 1. Multiple Records
ceived. the TG43 signal output is updated.
80 = Data Address Mark (Bit 0)
COMMAND DESCRIPTION 80 = O. FB (Data Mark)
80 = 1. F8 (Deleted Data Mark)
The FD179X will accept eleven commands. Com-
mand words should only be loaded in the Command E = 15 ms Delay(2MHz)
Register when the Busy status bit is off (Status bit 0). E = 1.15 ms delay
The one exception is the Force Interrrupt command.
Whenever a command is being executed. the Busy E =0, no 15 ms delay
status bit is set. When a command is completed. an (F 2) S = Side Select Flag (1791/3 only)
interrupt is generated and the Busy status bit is re-
set. The Status Register indicates whether the com- S = 0, Compare for Side 0
pleted command encountered an error or was fault S = l;-,Compare for Side 1
free. For ease of discussion. commands are divided
into four types. Commands and types are sum- (F, ) C = Side Compare Flag (1791/3 only)
marized in Table 2. C = O. disable side select compare
C = 1, enable side select compare
(F, ) S = Side Select Flag
Table 2 COMMAND SUMMARY (Bit 1. 1795/7 only)
BITS S = 0 Update SSO to 0
TYPE COMMAND 765 4 3 2 1 0 S = 1 Update SSO to 1
I Restore 0 000 h V rl ro
(F, ) b = Sector length Flag
I Seek 0 0 0 1 h V rl ro
o0 1 u h V rl ro (Bit 3. 1975/7 only)
I Step
I Step In 0 1 0 u h V rl ro
I Step Out 0 1 1 u h V rl ro Sector Length Field
II Read Sector 1 0 o m F2 E F, 0
00 01 10 11
II Write Sector 1 0 1 m F2 E F, 80
III Read Address 1 1 o0 0 E 0 0 b=O 256 512 1024 128
III Read Track 1 1 1 o0 E 0 0
III Write Track 1 1 1 1 o E 0 0 b = 1 128 256 512 1024
IV Force Interrrupt 1 1 0 1 h b II 10
Note: Bits shown in TRUE form.
338
The Type I Commands contain a head load flag (h) 10 field is then compared to the Track Register; if
which determines if the head is to be loaded at the there is a match and a valid 10 CRC. the verification
beginning of the command. If h = 1, the head is is complete. an interrupt is generated and the Busy
loaded at the beginning of the command (HlD output status bit is reset. If there is not a match but there is
=
is made active). If h O. HlO is deactivated. Once valid 10 CRC. an interrupt is generated, and Seek
the head is loaded, the head will remain engaged Error Status bit (Status bit 4) is set and the Busy
until the F0179X receives a command that specifi- status bit is reset. If there is a match but not a valid
cally disengages the head. If the FD179X is idle CRC. the CRC error status bit is set (Status bit 3).
=
(busy 0) for 15 revolutions of the disk. the head will and the next encountered 10 field is read from the
be automatically disengaged (HlD made inactive). disk for the verification operation. If an 10 field with a
valid CRC cannot be found after four revolutions of
The Type I Commands also contain a verification (V) the disk, the FD179X terminates the operation and
flag which determines if a verification operation is to sends an interrupt, (INTRa).
=
take place on the destination track. If V 1, a verifi-
The Step. Step-In, and Step-Out commands contain
cation is performed, if V = 0, no verifICation is per-
formed. an Update flag (U). When U = 1, the track register is
updated by one for each step. When U = 0, the track
During verification, the head is loaded and after an register is not updated.
internal 15 ms delay. the HlT input is sampled. On the 1795/7 devices, the SSO output is not affected
When HLT is active (logic true), the first encountered during Type 1 commands, and an internal side com-
10 field is read off the disk. The track address of the pare does not take place when the (V) Verify Flag is
on.
339
RESTORE (SEEK TRACK 0) SEEK
Upon receipt of this command the Track 00 (TROO) This command assumes that the Track Register con-
input is sampled. If moo
is active low indicating the tains the track number of the current position of the
Read-Write head is positioned over track 0, the Track Read-Write head. and the Data Register contains the
Register is loaded with zeroes and an interrupt is desired track number. The Fo179X will update the
generated. If TROO is not active low, stepping pulses Track register and issue stepping pulses in the ap-
(pins 15 to 16) at a rate specified by the f1ro field are propriate direction until the contents of the Track re-
issued until the ffRX) input is activated. At this time the gister are equal to the contents of the Data Register
Track Register is ~ with zeroes and an interrupt is (the desired track location). A verification operation
generated. If the TROO input does not go active low takes place if the V flag is on. The h bit allows the
after 255 stepping pulses. the Fo179X terminates op- head to be loaded at the start of the command. An
eration, interrupts. and sets the Seek error status bit. interrupt is generated at the completion of the com-
A verification operation takes place if the V flag is mand.
set. The h bit allows the head to be loaded at the
start of command. Note that the Restore command is STEP
executed when MR goes from an active to an inac- Upon receipt of this command. the F0179X issues
tive state. one stepping pulse to the disk drive. The stepping
motor direction is the same as in the prev.ious step
command. After a delay determined by ther,ro field. a
verification takes place if the V flag is on. If the u flag is
on, the Track Register is updated. The h bit allows the
head to be loaded at the start of the command. An
interrupt is generated at the completion of the command.
STEP-IN
Upon receipt of this command. the Fo179X issues
one stepping pulse in the direction towards track 76.
If the u flag is on, the Track Register is incremented
by one. After a delay determined by the r,r'0 field, a
verification takes place if the V flag is on. The h bit
allows the head to be loaded at the start of the
command. An interrupt is generated at the comple-
tion of the command.
STEP-OUT
Upon receipt of this command, the Fo179X issues
one stepping pulse in the direction towards track O. If
the u flag is on. the Track Register is decremented by
one. After a delay determined by the r,ro field. a ver-
ification takes place if the V flag is on. The h bit al-
lows the head to be loaded at the start of the com-
mand. An interrupt is generated at the completion of
the command.
TYPE II COMMANDS
The Type II Commands are the Read Sector and
Write Sector commands. Prior to loading the Type II
Command into the Command Register. the computer
must load the Sector Register with the desired sector
number. Upon receipt of the Type II command, the
busy status Bit is set. If the E flag = 1 (this is the
normal case) Hlo is made active and HlT is sam-
pled after a 15 msec delay. If the E flag is 0, the
head is loaded and HlT sampled with no 15 msec
delay. The 10 field and Data Field format are shown
onpage13.
340
countered 10 field is read and a comparison is again Sector Length Table
made. " there was a match, the Sector Number of
Sector Length Number of Bytes
the 10 field is compared with the Sector Register. "
there is not a Sector match, the next encountered 10 Field (hex) in Sector (decimal)
field is read off the disk and comparisons again 00 128
made. "the 10 field CRC is correct, the data field is 01 258
then located and wil be either written into, or read 02 512
from depending upon the command. The F0179X 03 1024
must find an 10 field with a Track number, Sector
number, side number, and CRC within four revolutions
of the disk; otherwise, the Record not found status bit is Each of the Type II Commands contains an (m) ftag
set (Status bit 3) and the command is terminated with an which determines if multiple records (sectors) are to
interrupt. be read or written, depending upon the command. "
=
m 0, a single sector is read or written and an inter-
rupt is generated at the completion of the oommand.
" m = 1, multiple records are read or written. with the
sector register intemally updated so that an address
verification can occur on the next record. The
F0179X wiD continue to read or write multiple records
and update the sector register until the sector regis-
1...8'1':.~·~~Y,1
•
341
ter exceeds the number of sectors on the track or 's' flag aIows direct control over the sse Une (Pin 25)
until the Force Interrupt command is loaded into the and is set or reset at the begi'lning of the command,
Command Register, which terminates the command dependent upon the value d this flag.
and generates an interrupt.
If the Sector Register exceeds the number of sectors READ SECTOR
on the track, the Record-Nat-Found status bit will be Upon receipt of the Read Sector command. the head
set. is loaded, the Busy status bit set, and when an 10
field is encountered that has the correct track
The Type" commands also contain side select com-
pare flags. When C = 0, no side comparison is made. number, correct sector number. correct side number,
When C = 1, the lSB of the side number is read off the and correct CRC. the data field is presented to the
10 Field of the disk and compared with the contents of computer. The Data Address Mark of the data field must
the (S) flag. If the S flag compares with the side number
be found within 30 bytes in single density and 43 bytes in
recorded in the 10 field, the 179X continues with the double density of the last 10 field CRe byte; if not. the
Record Not Found status bit is set and the operation is
10 search. If a comparison is not made within 5 index
terminated.
pulses, the interrupt line is made active and the Record-
Not-Found status bit is set. When the first character or byte of the data field has
been shifted through the OSR, it is transferred to the
The 1795/7 READ SECTOR and WRITE SECTOR com- DR, and ORO is generated. When the next byte is
mands include a 'b' flag. The 'b' flag, in conjunction with accumulated in the OSR, it is transferred to the DR
the sector length byte of the 10 Field, aHows different and another ORO is generated. If the Computer has
byte lengths to be implemented in each sector. For IBM not read the previous contents of the DR before a
compatability, the 'b' flag should be set to a one. The new character is transferred that character is /ost and
342
the Lost Data Status bit is set. This sequence con- next encountered 10 field is then read in from the
tinues until the complete data field has been inputted disk, and the six data bytes of the 10 field are as-
to the computer. If there is a CRC enor at the end of sembled and transferred to the DR, and a ORO is
the data field, the CRC error status bit is set, and the generated for each byte. The six bytes of the 10 field
command is terminated (even if it is a multiple record are shown below:
command).
Upon receipt of the Write Sector command, the head READ TRACK
is loaded (HLO active) and the Busy status bit is set. Upon receipt of the Read Track command, the head
When an 10 field is encountered that has the correct is loaded and the Busy Status bit is set. Reading
track number, correct sector number, correct side num- starts with the leading edge of the first encountered
ber, and correct CRC, a ORO is generated. The F0179X Index pulse and continues until the next index pulse.
counts off 11 bytes in single density and 22 bytes in As each byte is assembled it is transferred to the
double density from the CRC field and the Write Gate Data Register and the Data Request is generated for
(WG) output is made active if the ORO is serviced (i.e .• each byte. No CRC checking is performed. Gaps are
the DR has been loaded by the computer). If ORO has included in the input data stream. The accumulation
not been serviced. the command is terminated and the of bytes is synchronized to each Address Mark en-
Lost Data status bit is set. If the ORO has been ser- countered. Upon completion of the command. the in-
viced. the WG is made active and six bytes of zeros terrupt is activated. RG is not activated during the
in single density and 12 bytes in double density are Read Track Command. An internal side compare is not
then written on tne disk. At tnis time the Data Ad- performed during a Read Track.
dress Mark is then written on the disk as determined
by the So field of the command as shown below:
WRITE TRACK
ao Data Address Mark (Bit 0) Upon receipt of the Write Track command, the head
1 Deleted Data Mark is loaded and the Busy Status bit is set. Writing
o Data Mark starts with the leading edge of the first encountered
index pulse and continues until the next index pulse.
The F0179X then writes the data field and generates at which time the interrupt is activated. The Data Re-
ORa's to the computer. If the ORO is not serviced in quest is activated immediately upon receiving the
time for continuous writing the Lost Data Status Bit is command. but writing will not start until after the first
set and a byte of zeros is written on the disk. The byte has been loaded into the Data Register. If the
command is not terminated. After the last data byte DR has not been loaded by the time the index pulse
has been written on the disk. the two-byte CRC is is encountered the operation is terminated making
computed intemally and written on the disk followed the device Not Busy. the Lost Data Status Bit is set.
by one byte of logic ones in FM or in MFM. The WG and the Interrupt is activated. If a byte is not present
output is then deactivated. in the OR when needed, a byte of zeros is substi-
tuted. Address Marks and CRC characters are writ-
TYPE III COMMANDS ten on the disk by detecting certain data byte pat-
READ ADDRESS tems in the outgoing data stream as shown in the
table below. The CRC generator is initialized when
Upon receipt of the Read Address command, the any data byte from Fe to FE is about to be transfer-
head is loaded and the Busy Status Bit is set. The red from the DR to the OSR in FM or by receipt of
F5 in MFM.
In MFM only. lOAM and DATA AM are preceded by three bytes of A1 with cfock transition between bits 4 and 5
missing.
343
TYPE IH COMMAND WRITE TRACK
* Missing clock transition -between bits 4 and 5 *. Missing clock transition between bits 3 & 4
344
III1RQ
RESET as\'
.. TEST- •• NOOElAY
345
TYPE IV COMMAND
FORCE INTERRUPT
This command can be loaded into the command re-
gist~r at any time. If there is a current command
under execution (Busy Status Bit set), the command
will be terminated and an interrupt will be generated
when the condition specified in ·the 10 through 13 field
RESETIUSY
SET INTAO is detected. The interrupt conditions are shown be-
SETRNF low:
10 = Not-Ready-To-Ready Transition
1, = Ready- To-Not~Ready Transition
12 = Every Index Pulse
b = Immediate Interrupt (requires reset, see
Note)
NOTE: If 10 - 13 = 0, there is no interrupt generated but
the current command is terminated and busy is
reset. This is meonly command that will enable
the immediate interrupt to clear on a subse-
quent Load Command Register or Read Status
Register.
STATUS DESCRIPTION
Upon receipt of any command, except the Force In-
terrupt command, the Busy Status bit is set and the
rest of the status bits are updated or cleared for the
new command. If the Force Interrupt Command is
received when there is a current command under
execution, the Busy status bit is reset, and the rest of
the status bits are unchanged. If the Force Interrupt
command is received when there is not a current
command under execution, the Busy Status bit is
reset and the rest of the status bits are updated or
cleared. In this case, Status reflects the Type I com-
mands.
TYPE 10 COMMAND
Read Track/Address
346
FORMATTING THE DISK IBM 3740 FORMAT-128 BYTESISECTOR
(Refer to section on Type III commands for flow diag- Shown below is the IBM single-density format with
rams.) 128 bytes/sector. In order to format a diskette. the
Formaning the disk is a relatively simple task when
user must issue the Write Track command, and Ioac
operating programmed 1/0 or when operating under
the data register with the following values. For eve!')
byte to be written, there is one data request.
Formaning the disk is accomplished by positioning
the R/W head oyer the desired track number and is- NUMBER HEX VALUE OF
suing the Write Track command. Upon receipt of the OF BYTES BYTE WRITTEN
Write Track command, the FD179X raises the Data 40 FF (or 00)'
Request Signal. At this point in time, the user loads 6 00
the data register with desired data to be written on 1. FC (Index Mark)
the disk. For every byte of information to be written 26 FF (or 00)
on the ·disk, a data request is generated. This sequ- 6 00
ence continues from one index mark to the next 1 FE (10 Address Mark)
index mark. Normally, whatever data pattern appears 1 Track Number
in the data register is written on the disk with a nor- 1 Side Number (00 or 01)
mal clock panern. However, if the F0179X detects a 1 Sector Number (1 thru lA)
data pattem of F5 thru FE in the data register, this is 1 00
interpreted as data address marks with missing f. F7 (2 CRC's wrinen)
clocks or CRC generation. For instance, in FM an FE 11 FF (or 00)
panern will be interpreted as an 10 address mark 6 00
(DATA-FE, CLK-C7) and the CRC will be initialized. t FB (Data Address Mark)
An F7 panern will generate two CRC characters in 126 Data (IBM uses E5)
FM or MFM. As a consequence, the panems F5 thru 1 F7 (2 CRC's written)
FE must not appear in the gaps, data fields. or 10 27 FF (or 00)
fields. Also, CRe's must be generated by an F7 pat- 247" FF (or 00)
tern.
Disks may be formatted in IBM 3740 or System 34
formats with sector lengths of 128. 256, 512, or 1024 ·Write bracketed field 26 times
bytes. **Continue writing until F0179X interrupts out.
Approx. 247 bytes.
l-Optional '00' on 1795/7 only .
."..,,~otooGC~OC. ,-..,.s.'oQItII
. ' M (...'t~ •• I1110~
¥<SS-.GCIOClit ' • .ues.',01'10
. . . . , .... ''\\a..o.
347
1_ SYSTEM 34 FORMAT- 1. NON-IBM FORMAlS
256 BYTESISECTOR
Shown below is the IBM dual-density format with 256 Variations in the IBM format are possible to a Iimit~
bytes/sector. In order to format a diskette the user extent if the following requirements are met: sector
must issue the Write Track command and load the size must be a choice d 128, 256, 512, or 1024 bytes;
data register with the following values. For every byte gap size must be according to the following table. Note
to be written, there is one data request. that the Index Mark Is not required by the 179X. The
minimum gap sizes shown are that which Is required by
the 179X, with PLL Iock-up time, motor speed variation,
NUMBER HEX VALUE OF etc., adding additional bytes.
OF BYTES BYTE WRITTEN
80 4E FM MFM
12 00
3 F6
16 bytes FF
1
. FC (Index Mark)
4E
Gap I 32 bytes4E
ELECTRICAL CHARACTERISTICS
MAXIMUM RATINGS
Voo With Respect to Vss (Ground) =15 to -0.3V Operating Temperature OOC to 700c
Max. Voltage to Any Input With =15 to -0.3V Storage Temperature -55°C to +1250 C
Respect to Vss
VOD = 10 ma Nominal VCC = 35 rna Nominal
OPERATING CHARACTERISTICS (DC)
TA = O"C to 7O"C. Voo = + 12V ± .6V, Vss = OV. Vee = + 5V ± .25V
348
nlllNG CHARACTERISTICS
TA = OOC to 700c. Voo = + 12V ± .6V. Vss = OV. Vee =+5V ± .25V
III' ---+---.
,1!AlO ---t-----t
IiIIOTI , B • • • "...,.....'lY'.OlOW"DlS. .O
.". . DOUafS ..... aocc 'UH.
!~AV;~~ ~~ST CASEI
'UF .. '3SuS
349
WRITE ENABLE TIMING
SYMBOl CHARACTERISTIC MIN. TYP. MAX. UNITS CONDITIONs
TSET Setup ADDR & CS to WE 50 nsec
THLO Hold ADOR & CS from ~ 10 nsec
TWE WE Pulse Width 350 nsec
TORR ORO Reset from WE 400 500 nsec
TIRR INTRQ Reset from ~ 500 3000 nsec See Note 5
TOS Data Setup to \W 250 nsec
TDH Data Hold from ~ 70 nsec
I
'•• -----I ~
'~I
iiw ..AO
U Lf
-1'" t:=,.,~
lieU
I I
t--'. ---t---"-1
1-- 'c -- ----I
NOMINAL
350
WRITE DATA nMlNG: (ALL nMES DOUBLE WHEN eLK = 111Hz)
SYMBOL CHARACTERISTICS MIN. TYP. MAX. UNITS CONDITIONS
ClK
IIMHZ!
I ,r--- ~I
L
~4 IW/p~
---i 1 ~Twd2
WD
Twd!
ClJ(
(2MHZ)
we
351
MISCELLANEOUS nMING:
;;; j f ,..
I---- ',p---I
w' I J ""
I I
1----'". ~
;;;
J 1 ""
I I
1---- ,- -I
NOTES:
1. Pulse width on RAW READ (Pin 27) is normally 3. tbc should be 2 p.S, nominal in MFM and 4 p's nominal
100-300 ns. However. pulse may be any width if in FM. Times double when CLK = 1 MHz.
pulse is entirely within window. If pulse occurs in both 4. RCLK may be high or low during RAW READ (Polarity
windows. then pulse width must be less than 300 ns is unimportant).
for MFM at CLK = 2 MHz and 600 ns for FM at 2 5. Times double when clock = 1 MHz.
MHz. Tmes double for 1 MHz.
2. A PPL Data Separator is recommended for 8" MFM.
352
WESTERN DIGITAl.
c o R P 0 R A T I o N
355
In the MFM mode, clocks are decoded into the data The P.o, A1, Unes used for register selections can be
stream. The byte is again broken up into bit cells, wtth configured at the CPU in a variety of ways. These lines
the data bit written in the center of the bit cell if data may actually tie to CPU address lines, in which case
= 1. Clocks are only written if both surrounding data the 179X will be memory-mapped and addressed like
bits are zero. Figure 4B shows that this occurs only RAM. They may also be used under Program Control
once between Bit cell 4 and 5. Using this encoding by tying toa port device such as the 8255, 6820, etc.
scheme, pulses can occur 2, 3 or 4 microseconds As a diagnostic tool when checking out the CPU in-
apart. The bit cell time is now 2 microseconds; twice terface, the Track and Sector registers should respond
as much data can be recorded without increasing the like "RAM" when the 179X is idle (Busy = INTRa =
Frequency rate due to this encoding scheme. 0).
Because of internal synchronization cycles, certain
The 179X was designed to be compatible with the IBM time delays must be introduced when operating under
3740 (FM) and System 34 (MFM) Formats. Although Programmed I/O. The worst case delays are:
most users do not have a need for data exchange with
IBM mainframes, taking advantage of these well stud-
ied formats will insure a high degree of system PERATION NEXT DELAY REO'
performance. The 179X will allow a change in gap
OPERATION
fields and sector lengths to increase usable storage
capacity, but variations away from these standards is READ STATUS MFM = 141Ls·
not recommended. Both IBM standards are soft-sector REGI~TER ___ FM = 28ILs. __
format. Because of the wide variation in address marks, RITE TO READ FROM A NO DELAY
the 179X can only support soft-sectored media. Hard Y REGISTER DIFFERENT REG
sectored diskettes have continued to lose popularity,
mainly due to the unavailability of a standard and the
limitation of sector lengths imposed by the physical ·NOTE: Times Double when CLK = 1MHz (5Y4" drive)
sector holes in the diskette.
Other CPU interface lines are CLK, MR and DDEN.
The ClK line should be 2MHz (8" drive) or 1MHz (5V4"
PROCESSOR INTERFACE drive) with a 50% duty cycle. Accuracy should be ±1%
(crystal source) since all internal timing, including step-
The Interface of the 179X to the CPU consists of an ping rates, are based upon this clock.
8-bit Bi-directional bus, read/write controls and optional The MR or Master Reset Une should be strobed a
interrupt lines. By selecting the device via the CHIP minimum of 50 microseconds upon each power-on
SELECT Une, each of the five internal registers can condition. This line clears and initializes all intemal reg-
be accessed. isters and issues a restore command (Hex '03') on the
rising edge. A quicker steppinQE!te can be written to
the command register after a MR, in which case the
Shown below are the registers and their addresses: remaining steps will occur at the faster programmed
rate. The 179X will issue a maximum of 255 stepping
PIN 3 PIN 6 PIN 5 PIN 4 PIN 2 pulses in an attempt to expect the TROO line to go
CS A1 Ao RE=d WE-4 active low. This line should be connected to the drive's
TROO sensor.
0
0
0
0
I 0
1
STATUS REG
TRACK REG
COMMAND
REG
TRACK REG
The DDEN line causes selection of either single den-
sity (DDEN = 1) or double density operation. DDEN
should not be switched during a read or write operation.
0 1 0 SECTOR REG SECTOR REG
0 1 1 DATA REG DATA REG
1 X X H1-Z H1-Z
356
FLOPPY DISK INTERFACE check with the manufacturer for the proper configura-
The Floppy Disk Interface can be divided into three tion required.
sections: Motor Control, Write Signals and Read Sig- The amount of Precompensation time also varies. A
nals. All of these lines are capable of driving one TTL typical value will usually be specified from 1QO-3OOns.
load and not compatible for direct connection to the Regardless of the parameters used, Write Precorn-
drive. Most drives require an open-collector TTL inter- p80ENtion must be done external to the 179X. When
face with high current drive capability. This must be o is tied low, EARLY or LATE will be activated at
done on all outputs from the 179X. Inputs to the 179X least 125os. before and after the Write Data pulse. An
may be buffered or tied to the Drives outputs, providing Algorithm internal the 179X decides whether to raise
the appropriate resistor termination networks are used. EARLY or LATE, depending upon the previOUS bit pat-
Undershoot should not exceed -0.3 volts, while integ- tern sent. As an example, suppose the recommended
rity of V1H and VOH levels should be kept within spec. Precomp value has been specified at 150ns. The fol-
lowing action should be taken:
MOTOR CONTROL
EARLY LATE ACTION TAKEN
Motor Control is accomplished by the STEP and DIRC
lines. The STEP Une issues stepping pulses with a o o delay WD by 150ns (nominal)
period defined by the rate field in all Type I commands. o 1 delay WD by 300ns (2X value)
The DIRC line defines the direction of steps (DIRC = 1 o do not delay WD
1 STEP IN/DiRC = 0 STEP OUT).
Other Control lines include the iP or Index Pulse. This There are two methods of performing Write
line is tied to the drives' Index l.E.D. sensor and Precompensation:
makes an active transition for each revolution of the 1) External Delay elements
diskette. The TROO Une is another l.E.D. sensor that 2) Digitally
informs the 179X that the stepper motor is at its fur-
Shown in Figure 6 is a Precomp circuit using the West-
thest position, over Track 00. The READY line can be
ern Digital 2143 clock generator as the delay element.
used for a number of functions, such as sensing "door
The WD pulse from the 179X creates a strobe to the
open", Drive motor on, etc. Most drives provide a pro-
2143, causing subsequent output pulses on theA1,,(1'2
grammable READY Signal selected by option jumpers
and .03 signals. The 5K Precomp adjust sets the de-
on the drive. The 179X will look at the ready signal prior
sired Precomp value. Depending upon the condition of
to executing READ/WRITE commands. READY is not
EARLY and LATE,.9'1 will be used for EARLY, iI2 for
inspected during any Type I commands. All Type I
nominal (EARLY = LATE = 0), and B3 for LATE. The
commands will execute regardless of the logic level
use of "one-shots" or delay line in a Write Precom-
on this line.
pensation scheme offers the user the ability to vary the
Precomp value. The /lI4 output resets the 74LS175
WRITE SIGNALS Latch in anticipation of the next WD pulse. Figure 7
Writing of data is accomplished by the use of the WD, shows the WD-EARLY/LATE relationship, while Figure
WG, WF, TG43, EARLY and LATE lines. The WG or 8 shows the timing of this write Precomp scheme.
Write Gate line is used to enable write current at the Another method of Precomp is to perform the function
drive's R/W head. It is made active prior to writing data digitally. Figure 9 illustrates a relationship between the
on the disk? The WF or WRITE FAULT line is used to WD pulse and the CLK pin, allowing a digital Precomp
inform the 179X of a failure in drive electronics. This scheme. Figure 10 shows such a ~heme with a pre-
signal is multiplexed with the VFOE line and must be set Write Precompensation value of 250ns. The syn-
logically separated if required. Figure 5 illustrates three chronous counter is used to generate 2MHz and 4MHz
methods of demultiplexing. clock signals. The 2M Hz clock is sent to the CLK input
The TG43 or "TrACK GREATER than 43" line is of the 179X and the 4MHz is used by the 4-bit shift
used to decrease the Write current on the inner tracks, register. When a WD pulse is not present, the 4MHz
where bit densities are the highest. If not required on clock is shifting "ones" through the shift register and
the drive, TG43 may be left open. maintaining Q o at a zero level. When a WD pulse is
present, a zero is loaded at either A, B, or C depending
WRITE PRECOMPENSATION upon the states of LATE, EN PRECOMP and EARLY.
The zero is then shifted by the 4MHz clock until it
The 179X provides three signals for double density
reaches the Q o output. The number of shift operations
Write Precompensation use. These signals are WRITE
determines whether the WRITE DATA pulse is written
DATA, EARLY and LATE. When using single density
early, nominal or late. If both FM and MFM operations
drives (eighter 8" or 511."), Write Precompensation is
is a system reqUirement, the output of this circuit should
not necessary and the WRITE DATA line is generally
TTL Buffered and sent directly to the drive. In this be disabled and the WD pulse should be sent directly
mode, EARLY and LATE are left open. to the drive.
For double density use, Write Precompensation is a
function of the drive. Some manufacturers recommend
Precompensating the 511." drive, while others do not.
With the 8" drive, Precompensation may be specified
from TRACK 43 on, or in most cases, all TRACKS. If
the recommended Precompensation is not specified,
357
DATA SEPARATION
The 179X has two inputs (RAW READ & RCLK) and Shown in Figure 11 is a 2112 IC Counter/Separator. The
one output (VFOE) for use by an external data sepa- 74lS193 free runs at a frequency determined by the
rator. The RAW READ input must present clock and CRYClK input. When a RAW READ pulse occurs, the
data pulses to the 179X, while the RCLK input provides counter is loaded with a starting count of '5'. When the
a "window" or strobe signal to clock each RAW READ RAW READ Line returns to a logic 1, the counter
pulse into the device. An ideal Data Separator would counts down to zero and again free runs. The 74lS74
have the leading edge of the RAW READ pulse occur insures a 50% duty cycle to the 179X and performs a
in the exact center of the RCLK strobe. divide-by-two of the aD output.
Motor Speed Variation, Bit shifts and read amplifier Figure 12 illustrates another Counter/Separator utiliz-
recovery circuits a/l cause the RAW READ pulses to ing a PROM as the count generator. Depending upon
drift away from their nominal positions. As this occurs, the RAW READ phase relationship to RCLK, the PROM
the RAW READ pulses will shift left or right with re- is addressed and its data output is used as the counter
spect to RCLK. Eventually, a pulse will make its tran· value. A 16MHz clock is required for 8" double density,
sition outside of its RCLK window, causing either a while an 8M Hz clock can be used for single density.
CRC error or a Record-not-Found error at the 179X. Figure 13 shows a Phase-lock-loop data recovery
A Phase-Lock-Loop circuit is one method of achieving circuit. The phase detector (U2, Figure 2) compares
synchronization between the RCLK and RAW READ the phase of the SHAPED DATA pulse to the phase
signals. As RAW READ pulses are fed to the PLl, of VFO ClK + 2. If VFO ClK -T 2 is lagging the
minor adjustments of the free-running RClK frequency SHAPED DATA pulse an output pulse on #9, U2 is
can be made. If pulses are occurring too far apart, the generated. The filter/amplifier converts this pulse into
RClK frequency is decreased to keep synchroniza- a DC signal which increases the frequency of the VCO.
tion. If pulses begin to occur closer together, RClK is If, correspondingly, ClK + 2 is leading the SHAPED
increased until this new higher frequency is achieved. DATA pulse, an output pulse on #5, U2 is generated.
In normal read operations, RClK will be constantly This pulse is converted into a DC signal which de-
adjusted in an attempt to match the incoming RAW creases the frequency of the VCO. These two actions
READ frequency. cause the VCO to track the frequency of the incoming
Another method of Data Separation is the Counter- READ DATA pulses. This correction process to keep
Separator technique. The RClK signal is again free- the two signals in phase is constantly occurring because
running at a nominal rate, until a RAW READ pulse of spindle speed variation and circuit parameter
occurs. The Separator then denotes the pOsition of the variations.
pulse with respect to RClK (by the counter value), and The operating specifications for this circuit are as
counts down to increase or decrease the current RClK follows:
window. The next RClK window will occur at a nominal
rate and will continue to run at this frequency until an- Free Running Frequency 2MHz
other RAW READ pulse adjusts RCLK, but only the Capture Range ± 15%
present window is adjusted. lock Up lime 50 microsec." 1111" or
"0000" Pattern
Both PPl and Counter/Separator are acceptable
100 Microsec "1010" Pat-
methods of Data Separation. The PPl has the highest
tern
reliability because of its "tracking" capability and is rec-
ommended for 8" double density deSigns.
The RAW READ pulses are generated from the falling
As a final note, the term "Data Separator" may be edge of the SHAPED DATA pulses. The pulses are
misleading, since the physical separation of clock and also reshaped to meet the 179X requirements. VFO
data bits are not actually performed. This term is used ClK + 2 OR 4 is divided by 2 once again to obtain
throughout the industry, and can better be described VFO ClK OUT whose frequency is that required by the
as a "Data Recovery Circuit" rather than a Data 179X RClK input. RClK must be controlled by VFOE
Separator. so VFOE is sampled on each rising edge of VFO ClK
The VFOE signal is an output from the 179X that sig- OUT. When VFOE goes active EN RCLK goes active
nifies the head has been loaded and valid data pulses in synchronization with VFO CLK OUT preventing any
are appearing on the RAW READ line. It can be used glitches on the RClK output. When VFOE goes inac-
to enable the Data Separator and to insure clean RClK tive EN RClK goes inactive in synchronization with
transitions to the 179X. Since some drives will output VFO ClK OUT, again preventing any glitches on the
random pulses when the head is disengaged, VFOE RClK output.
can prevent an erratic RClK signal during this time. If Figure 14 illustrates a PPl data recovery circuit using
the Data Separator requires synchronization during a the Western Digital 1691 Floppy Support device. Both
known pattern of one's or zero's, then RG (READ data recovery and Write Precomp logic is contained
GATE) can be used. The RG signal will go active when within the 1691, allowing low chip count and Pll re-
the 179X is currently over a field of zeros or ones. RG liability. The 74S124 supplies the free-running VCO
is not available on the 1795/1797 devices, since this output. The PUMP UP and PUMP DOWN signals from
signal was replaced with the SSO (Side Select Output) the 1691 are used to control the 745124's frequency.
Line.
358
COMMAND USAGE FORCED INTERRUPT COMMAND
Whenever a command is successfully or unsuccess- The Forced Interrupt command is generally used to
fuRy completed, the busy bit of the status register is terminate a multiple sector command or to insure Type
reset and the INTRa line is forced high. Command ter- I status in the status register. The lower four bits of the
mination may be detected either way. The INTRa can command determine the conditional interrupt as follows:
be tied to the host processor's interrupt with an appro-
priate service routine to terminate commands. The 10 NOT-READY TO READY TRANSITION
busy bit may be monitored with a user program and 1, READY TO NOT-READY TRANSITION
will achieve the same results through software. Per- 12 EVERY INDEX PULSE
forming both an INTRQ and a busy bit check is not 13 IMMEDIATE INTERRUPT
recommended because a read of the status register to
determine the condition of the busy bit will reset the Regardless of the conditional interrupt set, any com-
INTRa line. This can cause an INTRa from not mand that is currently being executed when the Forced
occurring. Interrupt command is loaded will immediately be ter-
minated and the busy bit will be reset indicating an idle
RESTORE COMMAND condition.
On some disk drives, it is possible to position the R/W Then, when the condition for interrupt is met, the INTRa
head outward past Track 00 and prevent the TROO line will go high signifying that the condition specified
line from going low unless a STEP IN is first performed. has occurred.
If this condition exists in the drive used, the RESTORE The conditional interrupt is enabled when the corre-
command will never detect a TROO. Issuing several sponding bit positions of the command (13 -10) are set
STEP IN pulses before a RESTORE command will to a 1. If 13 -10 are all set to zero, no interrupt will occur,
remedy this situation. The RESTORE and all other but any command presently under execution will be
Type I commands will execute even though the READY immediately terminated upon receipt of the Force In-
bit indicates the drive is not ready (NOT READY = 1). terrupt command (HEX 00).
As usual, to clear the interrupt a read of the status reg-
READ TRACK COMMAND ister or a write to the command register is required.
The READ TRACK command can be used to manually The exception is when using the immediate interrupt
inspect data on a hard copy printout. Gaps, address condition (13 = 1). If this command is loaded into the
marks and a" data are brought in to the data register command register, an interrupt will be immediately
during this command. The READ TRACK command generated and the current command terminated.
may be used to inspect diskettes for valid formatting Reading the status or writing to the command register
and data fields as well as address marks. Since the will not automatically clear the interrupt; another forced
179X does not synchronize clock and data until the In- interrupt command with 13 -10 = 0 must be loaded into
dex Address Mark is detected, data previous to this 10 the command register in order to reset the INTRa from
mark will not be valid. READ GATE (RG) is not ac- this condition.
tuated during this command. More than one condition may be set at a time. H for
example, the READY TO NOT-READY condition (I, =
READ ADDRESS COMMAND 1) and the Every Index Pulse (12 = 1) are both set, the
In systems that use either multiple drives or sides, the resultant command would be HEX "DA". The "OR"
read address command can be used to tell the host function is performed so that either a READY TO NOT-
processor which drive or side is selected. The current READY or the next Index Pulse will cause an interrupt
position of the R/W head is also denoted in the six condition.
bytes of data that are sent to the computer.
DATA RECOVERY
ITRACK SIDE ISECTOR ILE~~TH IC~C IC~C I Occasionally, the R/W head of the disk drive may get
"off track", and dust or dirt may get trapped on the
media. Both of these conditions will cause a RECORD
The READ ADDRESS command as well as all other NOT FOUND andlor a CRC error to occur. This "soft
Type II and Type III commands wi" not execute if the error" can usually be recovered by the following
READY line is inactive (READY = (I). Instead, an in- procedure:
terrupt will be generated and the NOT READY status 1. Issue the command again
bit will be set to a 1. 2. Unload and load the head and repeat step
3. Issue a restore, seek the track, and repeat step 1
359
FIGURE 1 DEVICE CHARACTERISTICS
DEVICE SNGl DENSITY DBlE DENSITY INVERTED BUS TRUE BUS DOUBLE-SIDED
1791 X X X
1792 X X
1793 X X X
1794 X X
179S X X X X
1797 X X X X
UNFORMATTED FORMATTED
CAPACITY (NOMINAL) BYTE CAPACITY
TRANSFER
SIZE DENSITY SIDES PER TRACK PER DISK TIME PER TRACK PER DISK
"Based on 35 Tracks/Side
""Based on 18 Sectors/Track (128 byte/sec)
""·Based on 18 Sectors/Track (256 bytes/sec)
360
11.5 Appendex E - Z80A CPU ••••••••••••••••••
Z8400
zaer CPU Cealral
Proc....., U.II
Product
SpecUlcalloa
March 1981
Featur.. • The instruction set contains 158 instructions. may be daisy-chained to allow implemen-
The 78 instructions of the 8080A are
a
included as subset; 8080A software com-
tation of a priority interrupt scheme. Little,
if any, additional logic is required for I
patibility is maintained.
• Six MHz, 4 MHz and 2.5 MHz clocks for the
zaOB, zaOA, and zao CPU result in rapid
daisy-chaining.
• Duplicate sets of both general-purpose
and flag registers are provided, easing
9
instruction execution with consequent high the design and operation of system soft-
data throughput. ware through single-context SWitching,
• The extensive instruction set includes string, background-foreground programming, and
bit, byte, and word operations. Block Single-level interrupt processing. In addi-
searches and block transfers together with tion, two 16-bit index registers facilitate
indexed and relative addressing result in program processing of tables and arrays.
the most powerful data handling capabilities • There are three modes of high speed inter-
in the microcomputer industry. rupt processing: 8080 compatible, non-zaO
• The zao microprocessors and associated peripheral deVice, and zao Family
family of peripheral controllers are linked peripheral with or without daisy chain.
by a vectored interrupt system. This system • On-chip dynamic memory refresh counter.
.v.,....
COIITROL ! iiREO
IORO
RD
WI!
RFSH
Au ~ 1
A12 ~ 2
A.. ~ 3
40
39
38
A,.
'"
As
!
A,. ~ 4 37 A7
A,s _ 5
38 '"
elK ~ 8 35 As
D. 1 34 As
ZIOCPU D3 8 33 A3
COIITROL D. 9 32 A.
CPU
0,. 10 31 A,
Z80CPU
+5V 11 30 Ao
0. 12 211 GND
Dr [ 13 28 ~ IWSH
CPU { Do 14 21 ~ iii
.US
CONTROL Dl
iNT
15
18
2825 ~ REm
.. IUSREO
iiiii 11
24 ~]WAiT
HID 18 23 iUSACi
~ 19 22bJWii
iOiiO 20 21 Diiii
~--- .....
Figure 1. Pin Functions Figure 2. Pin Assignments
+SY __
GND __
CLOCK __
6 2001-0212
zao Micro- The Zilog zao microprocessor is the central each of which has an 8-bit prescaler. Each
procMIOI' element of a comprehensive microprocessor of the four channels may be configured to
Family product family. This family works together in operate in either counter or timer mode.
most applications with minimum requirements
• The DMA (Direct Memory Access) con-
for additional logiC, facilitating the design of troller provides dual port data transfer
efficient and cost-effective microcomputer- operations and the ability to terminate data
based systems. transfer as a result of a pattern match.
Zilog has designed five components to pro-
vide extensive support for the Z80 micro- • The SIO (Serial InpuVOutput) controller
processor. These are: offers two channels. It is capable of
operating in a variety of programmable
• The PIa (Parallel InpuVOutput) operates in modes for both synchronous and asyn-
both data-byte 110 transfer mode (with chronous communication, including
handshaking) and in bit mode (without Bi-Synch and SDLC.
handshaking). The PIa may be config-
ured to interface with standard parallel • The DART (Dual Asynchronous Receiver/
peripheral devices such as printers, Transmitter) device provides low cost
tape punches, and keyboards. asynchronous serial communication. It has
two channels and a full modem control
• The CTC (CounterlTimer Circuit) features interface.
four programmable 8-bit counter/timers,
I
zaoCPU
Registers
Figure 4 shows three groups of registers
within the Z80 CPU. The first group consists of
duplicate sets of 8-bit registers: a principal set
foreground data processing. The second set of
registers consists of six registers with aSSigned
functions. These are the I (Interrupt Register),
I
and an alternate set (designated by , [prime], the R (Refresh Register), the IX and IY (Index
e.g., A'). Both sets consist of the Accumula- Registers), the SP (Stack Pointer), and the PC
tor Register, the Flag Register, and six (Program Counter). The third group consists of
general-purpose registers. Transfer of data two interrupt status flip-flops, plus an addi-
between these duplicate sets of registers is tional pair of flip-flops which assists in identi-
accomplished by use of "Exchange" instruc- fying the interrupt mode at any particular
tions. The result is faster response to interrupts time. Table I provides further information on
and easy, efficient impletnentation of such ver- these registers.
satile programming techniques as background-
MAIIIIIIIQIITO I n ALUIIIIATIlIIIIQIITO an
a GENERAL PURPOSE C GENERAL PURPOSE a' GENERAL PURPOSE C' GENERAl PURPOSE
H GENERAL PURPOSE l GENERAL PURPOSE H' GENERAL PURPOSE l' GENERAL PURPOSE
_181T8_
IX INDEX REGISTER
IY INDEX REGISTER
SP STACK POINTER
INTERRUPT MODE FLlP·FlOPS
PC PROGRAM COUNTER
I INTERRUPT VECTOR
-18ITS_
I R MEMORY REFRESH INTERRUPT MODE 0
NOT USED
INTERRUPT MODE 1
INTERRUPT MODE 2
2001·0213 7
zaoCPU RegIster Sin (811.) Remarks
RegWien A.A' Accumulator 8 Stores an operand or the results of an operation.
(Continued)
F, F' Flags 8 See Instruction Set.
B, B' General Purpose 8 Can be uaed separately or as a 16-bit reqister with C.
C,C' General Purpose 8 See B, above.
0, D' General Purpose 8 Can be used separately or as a 16-bit register with E.
E, E' General Purpose 8 See O. above.
H.H' General Purpose 8 Can be uaed separately or as a 16-blt reqister with L.
L, L' General Purpose 8 See H, above.
Note: The (B.C). (O,E), and (H,L) sets are combined as follows:
B- High byte C - Low byte
0 - HiQhbyte E- Low byte
H - HiQh byte L- Low byte
Interrupt Register 8 Stores upper eight bits of memory addreaa for vectored interrupt
processing.
R Refresh Register 8 Provides user-transparent dynamic memory refresh. Automatically
incremented and placed on the addreaa bus durinQ each
instruction fetch cycle.
IX Index Register 16 Used for indexed addressing.
IY Index Register 16 Same as IX, above.
SP Stack Pointer 16 Stores addresses or data temporarily. See Push or Pop in instruc-
tion set.
PC Program Counter 16 Holds addreaa of next instruction.
IFF,-IFF2 Interrupt Enable Flip-Flops Set or reset to indicate interrupt status (see Figure 4).
IMFa-IMFb Interrupt Mode Flip-Flops Reflect Interrupt mode (see'Figure 4).
Interrupts: The CPU accepts two interrupt input signals: • Mode I - Peripheral Interrupt service, for
General NMI and INT. The NMI is a non-maskable use with non-8080/Z80 systems.
Operation interrupt and has the highest priority. INT is a • Mode 2 - a vectored interrupt scheme,
lower priority interrupt since it requires that usually daisy-chained, for use with Z80
interrupts be enabled in software in order to Family and compatible peripheral devices.
operate. Either NMI or INT can be connected
to multiple peripheral devices in a wired-OR The CPU services interrupts by sampling the
configuration. NMI and INT signals at the rising edge of the
The Z80 has a single response mode for last clock of an instruction. Further interrupt
interrupt service for the non-maskable inter- service processing depends upon the type of
rupt. The maskable interrupt, INT, has three interrupt that was detected. Details on inter-
programmable response modes available. rupt responses are shown in the CPU Timing
These are: Section.
• Mode a - compatible with the 8080 micro-
processor.
8
Interrupts: Non-Maskable Interrupt (NMI). The non- location in memory. Since the interrupting
General maskable interrupt cannot be disabled by pro- device supplies the low-order byte of the
Operation gram control and therefore will be accepted at 2-byte vector, bit 0 (Ao) must be a zero. .
(Continued) at all times by the CPU. NMI is usually Interrupt Prlorlty (DalBy Chaining and
reserved for servicing only the highest priority
Nested Interrupts). The interrupt priority of
type interrupts, such as that for orderly shut-
each peripheral device is determined by its
down after power failure has been detected.
physical location within a daisy-chain config-
After recognition of the NMI signal (providing
uration. Each device in the chain has an inter-
BUSREQ is not active), the CPU jumps to
rupt enable input line (lEI) al'ld an. interrupt
restart location 0066H. Normally, software
starting at this address contains the interrupt enable output line (lEO), which is fed to the
service routine. next lower priority device. The first device in
the daisy chain has its lEI input hardwared to
Maskable Interrupt (INT). Regardless of the a High level. The first device has highest
interrupt mode set by the user, the ZOO priority, while each succeeding device has a
response to a maskable interrupt input follows corresponding lower priority. This arrange-
a common timing cycle. After the interrupt has ment permits the CPU to select the highest
been detected by the CPU (provided that priority interrupt from several Simultaneously
interrupts are enabled and BUSREQ is not interrupting peripherals.
active) a special interrupt processing cycle The interrupting device disables its lEO line
begins. This is a special fetch (MI) cycle in to the next lower priority peripheral until it has
which IORQ becomes active rather than been serviced. After servicing, its lEO line is
MREQ, as in a normal Ml cycle. In addition, raised, allowing lower priority peripherals to
this special Ml cycle is automatically extended demand interrupt serviCing.
by two WAIT states, to allow for the time
The Z80 CPU will nest (queue) any pending
required to acknowledge the interrupt request
interrupts or interrupts received while a
and to place the interrupt vector on the bus.
selected peripheral is being serviced.
Mode 0 Interrupt Operation. This mode is
compatible with the 8080 microprocessor inter- Interrupt Enable/Disable Operation. Two
rupt service procedures. The interrupting flip-flops, IFFI and IFF2, referred to in the
device places an instruction on the data bus, register description are used to signal the CPU
which is then acted on six times by the CPU. interrupt status. Operation of the two flip-flops
This is normally a Restart Instruction, which is described in Table 2. For more details, refer
will initiate an unconditional jump to the to the zaG CPU Technical Manual and ZaG
selected one of eight restart locations in page Assembly Language Manual.
zero of memory.
Mode I Interrupt Operation. Mod~oper Action IFF! 1FF2 Comments
ation is very similar to that for the NMI. The 0 Maskable interrupt
CPU Reset 0
prinCipal difference is that the Mode 1 inter- INT disabled
rupt has a vector address of 0038H only. 01 instruction 0 0 Maskable interrupt
Mode 2 Interrupt Operation. This interrupt execution INT disabled
mode has been designed to utilize most effec- EI instruction Maskable interrupt
tively the capabilities of the Z80 microproc- execution INT enabled
essor and its associated peripheral family. The LD A,I instruction IFF2 - Parity flag
interrupting peripheral device selects the execution
starting address of the interrupt service LD A,R instruction IFF2 - Parity flag
execution
routine. It does this by placing an 8-bit
address vector on the data bus during the Accept NMI 0 IFFj IFFj - IFF2
(Maskable inter-
interrupt acknowledge cycle. The high-order rupt INT disabled)
byte of the interrupt service routine address is
RETN instruction IFF2 IFF2 - IFFj at
supplied by the I (Interrupt) register. This flex- execution completion of an
ibility in selecting the interrupt service routine NMI service
address allows the peripheral device to use routine.
several different types of service routines. Tabl. 2. State of Flip-Flops
These routines may be located at any available
9
IDstructiOD The 280 microprocessor has one of the most o 16-bit arithmetic operations
Set powerful and versatile instruction sets o Rotates and shifts
available in any a-bit microprocessor. It
includes such unique operations as a block o Bit set, reset, and test operations
move for fast, efficient data transfers within o Jumps
memory or between memory and 1/0. It also
o Calls, returns, and restarts
allows operations on any bit in any location in
memory. o Input and output operations
The following is a summary of the Z80 A variety of addressing modes are
instruction set and shows the assembly implemented to permit efficient and fast data
language mnemonic, the operation, the flag transfer between various registers, memory
status, and gives comments on each instruc- locations, and input/output devices. These
tion. The Z80 CPU Technical Manual addressing modes include:
(03-0029-01) and Assembly Language
Programming Manual (03-0002-01) conta-in o Immediate
significantly more details for programming o Immediate extended
use. o Modified page zero
The instructions are divided into the
following categories: o Relative
o a-bit loads o Extended
o 16-bit loads o Indexed
o Exchanges, block transfers, and searches o Register
o a-bit arithmetic and logic operations o Register indirect
o General-purpose arithmetic and CPU o Implied
control OBit
a-Bit
--.omc
8)'IIIboIlc:
0peratI- s
,.
B PlY If C
Opcod!t .o.of ••ofM ••ofT
78 M3 210 Hex Byte. CycJ.e SIatee c--ta
Load
Group LDr. r'
LD r. n
r - r'
·· ·· x
x ·· ··
x
x
01 r
00 r 110
-n-
r' ~
000
001
B
C
·· ·
LDr. (HL) r - (HL) 7 0
··
X X 01 r 110 010
LDr.(IX+d) r - (IX + d) x x 11 011 101 DO 19 011 E
01 r 101 100 H
-d- 101 L
LOr. (IY+d) r - (IY+d)
··x·x· II III 101
01 r 110
-d-
FO 19 III A
LD(HL). r
LD(lX+d).r
(HL) - r
(IX+d) - r · · ·· ··x
X
x
X
01 110 r
II 011 101
01 110 r
DO
7
19
· · ·
-d-
LD (lY +d). r (lY+d) - r X X II III 101 FD 19
01 110 r
··x · ·
-d-
LD (HL). n (HL) - n x 00 110 110 36 10
LD (lX+d). n (lX+d) - n
· ·
X X II 011 101 DO
00 110 110 36
19
··x ·x ·.·
-d-
-n-
LD (lY+d). n (lY+d) - n 11 III 101 FD 19
00110110 36
-d-
· · ·· ··
-n-
LO A. (BC) A - (BC) x x 00 001 010 OA 7
LOA. (DE) A - (DE) X X 00 Oil 010 IA 7
LD A. (nn) A - (nn)
· · · X X 00 III 010 3A
-n-
13
··· ·· ··· ··
LO (BC). A (BC) - A x x 00 000 010 02 7
LO (DE). A (DE) - A x x 00 010 010 12 7
LD (nn). A (nn) - A X X 00 110 010 32 13
-n-
LOA. I A - I I X
· 0 X IFF 0 11 101 101
01 010 III
ED
57
LO A. R A-R I X
· 0 X IFF 0 11 101 101
OJ 011 III
ED
SF
LOI. A I - A
·· · ·. x x II 101 101 ED
·· · · ·
01 000 III 47
LOR. A R-A x x 11 101 101 ED
01 001 III 4F
2001·001
10
16-Bit Load
Group
--.c
~
0peraU0e I Z
Flap
B .IV • C
Opcod.
"sa 110 ... IY* c,-. ......
110.01 . . . . . . .00T
c--ta
LD dd, nn dd - nn
·· · · X X 00 ddO 001
-n-
10 dd
'OOBC
Pair
·· · ·
01 DE
LDIX, nn IX-nn X X 11 011 101 DO 14 10 HL
00 100 001 21 11 SP
·· · ·
-n-
LD IY, nn IY - nn X X 11 III 101 FD 14
00 100 001 21
-n-
LD HL, (nn) H - (nn+l)
L - (nn) ·· · · X X 00 101 010 2A
-n-
16
·· · ·
-n-
LDdd, (nn) ddH - (nn+l) X X 11 101 101 ED 20
ddL - (nn) 01 ddl 011
· · ·
-n-
LD IX, (nn) IXH - (nn+ I) X X 11 011 101 DO 20
IXL - (nn) 00 101010 2A
-n-
LD IY, (nn) IYH - (nn+1)
IYL - (nn) ·· · · X X 11 III 101 FD
00 101 010 2A
-n-
6 20
-n-
LD (nn), HL (nn+1) - H
(nn) - L · · · X X 00 100 010 22
-n-
16
I
LD (nn), dd (nn+1) - ddH
· · · X X 11 101 101 ED 6 20
LD (nn), IX
(nn) - ddL
(nn+1) - IXH
·· · · X X
01 ddO 011
-n-
-n-
11 011 101 DO 20
I
(nn) - IXL 00 100 010 22
-n-
-n-
LD (nn), IY (nn+l) - IYH
(nn) - IYL · · · X X 11 III 101
00 100 010
FD
22
6 20
· ·· ·· ··
-n-
LDSP, HL SP - HL X X 11 111 001 F9 6
LDSP, IX SP-IX X X 11 011 101 DO 10
· · ·
11 111 001 F9
LD SP, IY SP - IY X X 11 111 101 FD 10
11 III 001 F9 9!L....!!!!:.
PUSH qq (SP-2) - qqL
(SP-I) - qqH · · · X X 11 qqO 101 11 00
01
SC
DE
·· · ·
SP - SP -2 10 HL
PUSH IX (SP-2) - IXL X X II 011 101 DO 15 11 AF
(SP-l) - IXH 11 100 101 E5
· · ·
SP - SP -2
PUSH IY (SP-2) - IYL X X 11 111 101 FD 15
(SP-I) - IYH 11 100 101 E5
· · ·
SP - SP -2
POPqq qqH - (SP+I) X X 11 qqO 001 10
qqL - (SP)
· · ·
SP - SP +2
POP IX IXH - (SP+ 1) X X 11 011 101 DO 14
IXL - (SI') 11 100 001 EI
SP - SP +2
POPIY IYH - (SP+I)
IYL - (SP)
SP - SP +2
·· · · X X 11 III 101 FD
11 100 001 EI
14
NOTES: del ia any of the regilter pairs BC. DE. HL. SP.
qq i. any of the regiater pairs AF. BC. DE. HL.
(PAIR)H' (PAIR)L refer to high order and low order eight bUa of the regiater pair reapectively.
e.g .. BCL = C. AFH = A.
Exchange. EX DE, HL
EXAF, AF'
DE - HL
AF-AF' · ·· x
X ···· X
X
11 101 011 EB
00 001 000 08
Block
Transfer.
EXX BC - SC'
DE - DE'
HL - HL'
· x
· · x 11 011 001 D9 ReqI8ter bank and
auxiliary Nql8ter
bank exchange
Block Search
Groups
EX (SP), HL H - (SP+1)
L - (SP) ·· X
· · X 11 100 011 E3 19
· <D·
IXL - (SP) 11 100 011 E3
EX (SP), IY IYH - (SP+l)
· X X 11
11
III
100
101
011
FD
E3
23
.
IYL - (SP)
2001·001 11
Exchange. 8ymboUc Flap Opeocle No.of No.of M No.of T
MMmOllle o,-tIOD 8 Z R PlY N C 71 543 210 Hex Byt.a c,clea 8taw. eom-ts
Block
Transfer.
Block Search LDD (DE) - (HL)
DE - DE-I
. X X
(i)
I 0 . II 101 101 ED
10 101 000 AS
16
Groups HL-HL-I
BC-BC-I
(Continued)
LDDR (DE) - (HL) X 0 X 0 0 II 101 101 ED 21 If BC .. 0
DE - DE-I 10 III 000 B8 16 If BC = 0
HL - HL-I
BC-BC-I
Repeat until
BC = 0
~ (i)
CPI A - (HL) X X I II 101 101 ED 16
HL - HL+ I 10 100 001 Al
BC - BC-I
~ (i)
CPIR A - (HL) X X I II 101 101 ED 21 IfBC .. Oand
A .. (HL)
HL - HL+ I 10 110001 BI 16 IfBC=Oor
BC - BC-I A = (HL)
Repeat until
A = (HL) or
BC " 0
~ (i)
CPD A - (HL) X I X II 101 101 ED 16
HL - HL-I 10 101 001 A9
BC - BC-I
~ CD
CPDR A - (HL) X II 101 101 ED 21 IfBC .. Oand
A .. (HL)
HL - HL-I 10 III 001 B9 16 IfBC=Oor
BC - BC-I A = (HL)
Repeat until
A" (HL) or
BC " 0
10m 110
- d -
INC (lY +d) (lY+d) -
(lY+d)+ I
X I X V 0
· II III 101
00 110 trn!lJ
FD 23
- d
DECm m - m-I X V I [!Q] m is any 01 r. (HL).
(IX + d). (IY + d)
as shown lor INC
DEC same lormat
and states as INC
Replace miQI
with
IIQD in opcode.
2001-001
12
General· &y.boIIc ..... 0pe0M
,. sa 210 ....
1Io.al JIo.aI. 110.01 T
Purpose
Arithmetic
~
DAA
Op.atioa
Converlll ace. content
into packed BCD
s Z
X
B
X P
PIV ..
. C
00 100 111 T1
Iytee CJc- SIatee ea.-..
Decimal adjust
accumulator.
and following add or
subtract with packed
CPU Control BCD operands.
Groupll CPL A-A
· X I X
· 00 10l III 2F Complemenl
accumulator (one's
complement).
NEG A-O-A X X V I II 10l 101 ED Neqate ace. (two's
«
··
01 000 100 complement).
CCF Cy-cr X X
· 0 00 III III 3F Complement carry
flaq.
SCF
· X
··
X
·· :n
....
··· ···
CY - I ~ 0 00110111 Set carry flaq.
NOP No ope....tion X X
···
00 000 000 00
HALT CPU halted X X 01 110 110 76 ..
0/.
EI.
IFF - 0
IFF - I
· ··
X
X ·· X
X
11 110 011
11 III 011
F3
FB
....
IMO Set inlerrupt
mOde 0
X
· X
· II 101 101 ED 8
· ·
01000 110 46
IMI Set interrupt
mode I
X X
· 11 101 101 ED
··
01 010 110 56
1M2 Sel interrupt
mode 2
X
· · X II 101 101
01 01 I 110
ED
5E
E
CY indicat... the carry f1ip·f1op.
* indicates mterrupts are not sampled at the end of EI or 01.
IS-Bit
Arithmetic
ADD HL, sa
ADC HL,'8
HL - HL+sa
HL - HL+os+CV
· X
X X
X X
X
·
V
0
0
I
t
00 sol 001
11 101 101 ED
II
15
~
00 BC
01 DE
ft
•a
Group 01 ssl 010 10 HL
11 SP
SBC Hl., .. HL - HL-IS-CY X X X V 11 101 101 ED IS
01 ssO 010
ADD IX. pp IX - IX + pp X X
· 0 I 11
01
011
ppl
101 DD
001
IS
~
01 DE
10 IX
11 SP
ADD IV. rr Iv - IY + rr X X X
· 0 I II III 101 FD
00 rrl 001
IS rr Req.
001iC
Ol DE
10 IY
11 SP
INC ••
INC IX
ss - 55 + 1
IX - IX + 1 · · ··
X
X
X
X
OO.sOOII
11011 101
00100011
DD
23
6
10
INC IV IV - Iv + I
· · X 11 III 101 FD 10
·· · ··
00 100 011 23
DEC .. sa - ss-1 X X 00 s.1 Oil 6
DEC IX IX - IX-l X X 11 011 101 DD 10
00 101 011 2B
DEC IV IY - IV- I X
· · X 11 III 101
00 101011
f"D
2B
10
Rotate and
Shift Group RLCA @]~~OJ=:J
· X 0 X
· 0 00 ()()() III 07 Rotate lelt circular
accumulator.
RLA l@-~-E.-=-_ITJ X 0 X
· 0 I 00 010 III 17 Rotate left
accumulator.
RRCA CO:::=i:}-L[£] 0 X
· 0 00 001 111 OF Rotate righl circular
accumulator.
RRA LETI=@J A
X 0
· 0 00 011 III IF Rotate right
accumullJtnr.
·,"IIJIII 13
Rotate and Symbolle Flap Opcode No.~ No.ol M No.ol T
IIDelDoDie OperatIOD 5 Z a PIV N C 78 543 210 ae. Byt.. eyeIH Slat.. ColDlDeDle
Shift Group
(Continued)
RR m LEtJ=@J X 0 X P a IQTIJ
m-r.(HL).(IX +d).(IY + d)
RLD ~_B
L __
r;-gol I XOXPo· II 101 101
01 101 III
ED
6F
18 Rotate digit leI! and
right between
A tHLI
the accumulator
RRD ,[7-.I4£L
A
1/-38°1
tHLI
I x 0 x P 0 II 101 101
01 100 III
ED
67
18
and location (HL)
The content ot the
upper hall ot
the occumulator IS
unaftected
Jump
Group
JP nn PC - nn
· · X X II 000 011 C3
- n -
10
cc Condition
JP cc. nn It condition cc is
true PC - nn.
otherwise
· · · X X II cc 010 10 iiiiQNZ;,~
001
010
Z zero
NC non-carry
contmue 011 C CdTry
100 PO parity odd
101 PE parity even
110 P sign positive
IRe PC - PC+e
· · X X 00011000 18
- e-2 -
12 III M sign negative
JR C. e II C
continue
= O.
If C = I.
· · X X 00 III 000 38
- e-2 -
12
If condition not mel.
If condition is mel.
· · ·
PC-PC+e
JP Z. e If Z = 0 X X 00 101 000 28 If condition not met
continue - e-2 -
If Z = I. 12 If condition is met.
· ·
PC-PC+e
fR NZ. e It Z = I. X X 00 100 000 20 It condihon not mel.
continue - e-2 -
If Z = O. 12 If condition is met.
PC-PC+e
JP (HL) PC - HL
· X X II iOI 001 E9
lP (IX) PC - IX
· · X X I I 011 101 DD
II 101 001 E9
2001001
14
Jump Group
(Continued) ........ .........
0p.NIIaa I I
.....
•x p" • C
0peMe
" . . II. . . ..... erca. ......
..... ........... r
c--..
JP(lY) Pe-IY
·· · · x 11 111 101 FD 8
· · ·
11 101 001 Ell
Dmz,. B - B-1 X X 00 010000 10 U B. O.
JlB.O, - .-2-
conHnue
UB.O, 2 13 UB. O.
Pe- PC+.
Call cmcI
RetumGroup
CALLnn (SP-I) - PCH
(SP-2) - PCL
PC-nn
·· · ··· X X 11 001 101 CD
-- --n
n
17
CALLcc, nn U condition
cc Is /alee
continue, _
otberwIIe at
·· · ·· X X e 11 cclOO 10
17
U oclsla• .
If oc 1I1r11e.
CALLnn
REToc U condition
oc', faJ. ·· · · X X lIccOOO Ilcc 11 fa• .
I
continue,
otherwise
_ill
II U oc 1.1nIa.
cc Condition Q
a
RET
000 NZ non·zero
· .. · ·
001 Z rero
010 NC non-carry
RETI Return Irom X X 11 101 101 ED 14 011 C carry
RETNI
Interrupt
Return Irom
non·malkable
.. · · · X X
01001
11 101
01000
101
101
101
4D
ED
45
14
100 PO parity odd
101 PE parity even
110 P li9n~tlve
Interrupt 111M 119n n894live
RSTp (SP-l) - PCH
(SP-2) - PCL
PCH -0
·· · ··· X X 11 I III ·11
~
001 <XiH
PCL-P 010 10H
011 18H
100 20H
101 28H
110 30H
III 38H
NOTE: 'RETN loods IFF2 - IFFI
·
Acc.lo As - AIS
Output Group INr, (C) r-(C) I X X P 0 11 101 101 ED 12 CtoAo - A7
if r = 110 only the 01 r 000 BtoAs - AIS
niIQl. will be affected
CD
INI (HL) -(C) x I X X X X 11 101 101 ED 16 CtoAo - A7
B - B-1 10100 010 A2 BtoAs - AIS
HL-HL+I
INIR (HL)-(C) X X X X X 11 101 101 ED S 21 CloAo - A7
B - B-1 10110010 B2 (If B.O) BtoAs - AIS
HL-HL+I .. 16
Repeat until (II B=O)
B=O
<D
!ND (HL)-(C) X I X X X X 11 101 101 ED 16 CtoAo - A7
B - B-1 10101010 AA B to As - AIS
HL - HL-I
INDR (HL) - (C) X X X X X I 11101 101 ED S 21 CtoAo - A7
B - B-1 10 111010 BA (IIB.O) B to As - AIS
HL - HL-I ..
B=O)
16
Repeat until (If
B=O
OUT (n), A (n) - A
· · · X X 11 010 011 D3 II n to Ao - A7
· <D· · ·
- n - Ace. to As - AIS
OUT(C),r (C)-r X X II 101 101 ED 12 C toAo - A7
01 r 001 BloAs - AIS
NOTE: <D If the result 0/ B-1 II %em the Z fI.g is ..t. oIherwl... ,t il reset.
2001·001 15
Input aDd Symbolic Flap 0pc0cIe No.of No.of M No.of T
~ Operatioa S Z B PIV It C 78 543 210 lie" ay.. Crc- 5taIM eom-ts
Output Group
(Continued) orDR (C) - (HL) X I X X X X I II !OI !OI ED 5 21 CtoAQ - A7
B - B-1 10 III 011 (1/ B*O) BtoAa-AI5
HL-HL-I 4 16
Repe<lt until (II B;O)
B;O
Summary of 0., Do
Flag m.tructIOD S z H PlV N C Comme.ts
2001·001
16
Pin Ao-A15. Address Bus (output, active High, placed on the data bus.
Descriptions 3-state). Ao-AlS form a 16-ba address bus. The MI. Machine Cycle One (output, active Low).
Address Bus provides the address for memory
MI, together with MREQ, indicates that the
data bus exchanges (up to 64K bytes) and for
current machine cycle is the opcode fetch
I/O device exchanges.
cycle of an instruction execution. Ml, together
BUSACK. Bus Acknowledge (output, active with 10RQ, indicates an interrupt acknowledge
Low). Bus Acknowledge indicates to the cycle.
requesting device that the CPU address bus,
data bus, and control signals MREQ, 10RQ, MREQ. Memory Request (output, active
RD, and WR have entered their high- Low, 3-state). MREQ indicates that the address
impedance states. The external circuitry bus holds a valid address for a memory read or
can now control these lines. memory write operation.
BUSREQ. Bus Request (input, active Low). NMI. Non-Maskable Interrupt (input, active
Bus Request has a higher priority than NMI Low). NMI has a higher priority than INT. NMI
and is always recognized at the end of the cur- is always recognized at the end of the current
rent machine cycle. BUSREQ forces the CPU instruction, independent of the
address bus, da~ bus, and control signals status of the interrupt enable flip-flop, and
MREQ, 10RQ, RD, and WR to go to a high- automatically forces the CPU to restart at
impedance state so that other devices can location 0066H.
control these lines. BUSREQ is normally wire- RD. Memory Read (output, active Low,
ORed and requires an external pullup for 3-state). RD indicates that the CPU wants to
these applications. Extended BUSREQ read data from memory or an 110 device. The
periods due to extensive DMA operations can addressed I/O device or memory should use
prevent the CPU from properly refreshing this signal to gate data onto the CPU data bus.
dynamic RAMs.
RESET. Reset (input, active Low). RESET
Do-I>? Data Bus (input/output, active High, initializes the CPU as follows: it resets the
3-state). Do-D7 constitute an 8-bit bidirectional interrupt enable flip-flop, clears the PC and
data bus, used for data exchanges with Registers I and R, and sets the interrupt status
memory and I/O. to Mode O. During reset time, the address and
HALT. Halt State (output, active Low). HALT data bus go to a high-impedance state, and all
indicates that the CPU has executed a Halt control output signals go to the inactive state.
instruction and is awaiting either a non- Note that RESET must be active for a minimum
maskable or a maskable interrupt (with the of three full clock cycles before the reset
mask enabled) before operation can resume. operation is complete.
While halted, the CPU executes Naps to RFSH. Refresh (output, active Low). RFSH,
maintain memory refresh. together with MREQ, indicates that the lower
INT. Interrupt Request (input, active Low). seven bits of the system's address bus can be
Interrupt Request is generated by 110 devices. used as a refresh address 10 the system's
dynamiC memories.
The CPU honors a request at the end of the
current instruction if the internal software- WAIT. Waif (input, active Low). WAIT
controlled interrupt enable flip-flop (IFF) is indicates to the CPU that the addressed mem-
enabled. INT is normally wire-ORed and ory or I/O devices are not ready for a data
requires an external pullup for these transfer. The CPU continues to enter a Wait
applications. state as long as this signal is active. Extended
WAIT periods can prevent the CPU from
IORQ. Input/Output Request (output, active refreshing dynamic memory properly.
Low, 3-state). 10RQ indicates that the lower
half of the address bus holds a valid I/O WR. Memory Write (output, active Low,
address for an I/O read or write operation. 3-state). WR indicates that the CPU data bus
holds valid data to be stored at the addressed
10RQ is also generated concurrently with Ml
memory or 110 location.
during an interrupt acknowledge cycle to indi-
cate that an interrupt response vector can be
17
CPU Timing The Z80 CPU executes instructions by pro- The basic clock period is referred to as a
ceeding through a specific sequence of opera- T time or cycle. and three or more T cycles
tions: make up a machine cycle (Ml. M2 or M3 for
instance). Machine cycles can be extended
• Memory read or write
either by the CPU automatically inserting one
• I/O device read or write or more Wait states or by the insertion of one
• Interrupt acknowledge or more Wait states by the user.
T, T2 Tw
CLOCK
Ao-Au
_ ......_ J
«( ( ~
I.-f'!
_ _--.--,r"______ f--®
RFSH ~_ _ _ _ _ _ _J~
NOTE: Tw- Wait cycle added when necessary lor slow ancilliary devices.
18 2005·882
CPU Memory Read or Write Cycles. Figure 6 bus is stable, so that it can be used directly as
Timing shows the timing of memory read or write a Chip Enable for dynamic memories. The WR
(Continued) cycles other than an opcode fetGh (Ml) cycle. line is active when the data bus is stable, so
The MREQ and RD signals function exactly as that it can be used directly as an RlW pulse to
in the fetch cycle. In a memory write cycle, most semiconductor memories.
MREQ also becomes active when the address
T, Tw
CLOCK
iiii
0'=:
0 ...
{
Do-D7
WR
;'
.:::!:
o ...
{
Do-D7----__________~--------~~--~D~A~TA~O~U~T------------~
2()()~ 881 19
CPU Input or Output Cycles. Figure 7 shows the inserts a single Wait state (Tw). This extra Wait
Timing timing for an 110 read or 110 write operation. state allows sufficient time for an I/O port to
(Continued) During 110 operations, the CPU automatically decode the address and the port address lines.
Tw' Tw
CLOCK
Ao-A
Wiii
--r-~---+--------~~~~'
WR
WRI~:
OPERATION {
Do-D7 ------i..--------..,)'----~;;;;~--~
NOTE: Tw" = One Wait cycle automatically inserted by CPU.
Figure 7. Input or Output Cycles
Interrupt Request/Acknowledge Cycle. The During this Ml cycle, 10RQ becomes active
CPU samples the interrupt signal with the ris- (instead of MREQ) to indicate that the int'3r-
ing edge of the last clock cycle at the end of rupUng device can place an 8-hit vector on the
any instruction (Figure 8). When an interrupt data hus. The CPU automatically adds two
is accepted, a special Ml cycle is generated. Wait states to this cycle.
AO-A15 _________~-'.~---------p-C--~----+r~~--~-~--,~---
Wiii __________~-----------------~--~~J
- r@
Do-D7====:t~-------~~=;;::JS~K:
NOTE: 1) TL = Last state of previous instruction. 2) Two Wait cycles automatically inserted by CPU(").
20 . 2005·884. 885
CPU Non-Maskable Interrupt Request Cycle. that of a normal memory read operation except
Timing NMI is sampled at the same time as the that data put on the bus by the memory is
(Continued) maskable interrupt input INT but has higher ignored. The CPU instead executes a restart
priority and cannot be disabled under software (RST) operation and jumps to the NMI service
control. The subsequent timing is similar to routine located at address 0066H (Figure 9).
CLOCK
I
9
• Although NMI is an asynchronous input. to ~antee its being must occur no later H the rising edge of the clock cycle
recognized on the following machine cycle. NMl's falling edge preceding TLAST.
Bus Request/Acknowledge Cycle. The CPU lines to a higr, ,. '1 pedance state with the rising
samples;:BUSREQ with the rising edge of the edge of the nE ! . :lock pulse. At that time, any
last clock period of any machine cycle (Figure external devic!' ,an take control of these lines,
10). If BUSREQ is active, the CPU sets its usually to transfer data between memory and
address, data, and MREQ, 10RQ, RD, and WR I/O devices.
T, T, 1,
"
CLOCK
SUSNEQ
----------~~--~_+----7~--------J
. .-.. ==========tj----.,(~-----~~--------t1
h-D1::::::::::::::::::::t=~---.,(~------~~--------t-4
~--------------------+-~
~.--------~r"",1--------11
111
@--
IiALT UNCHANGED
--------------------+--------------------------------
NOTE: TL = Last state of any M cycle. TX = An arbitrary clock cycle used by requestinQ device.
20050218. 886 21
CPU BaIt Acknowledge Cycle. When the CPU received. When in the Halt state, the HALT
Timing receives a HALT instruction, it executes NOP output is active and remains so until an inter-
(Continued) states until either an INT or NMI input is rupt is processed (Figure 11).
.1 ~
_I_
~ ~
.1~ ~
-I-
~ ~
.1
CLOCK
• •
HALT
::::;-I0Il ~_.____________
..M. ~
NOTE: INT will also force a Halt exit. "See note, Figure 9.
Reset Cycle. RESET must be active for at least inactive, two internal T cycles are consumed
three clock cycles for the CPU to properly before the CPU resumes normal processing
accept it. As long as RESET remains active, the operation. RESET clears the PC register, so the
address and data buses float, and the control first opcode fetch will be to location 0000
outputs are inactive. Once RESET goes (Figure 12).
_M1------
CLOCK
Ao-A15
Do-D7
I
iiIl _ _ _ _ _ _ _ _ _ _ _.J
f
~R~
==:
R~----------~7~7~7~---~;~J~----------------------~\~---------------
BUSACK
HALT
III/III ~_________
2005·887, 888
22
AC ZIG CPU ZIOACPU ZIG. CPU
QuIrac-
terlatlCli IfUlDha- Symbol PCll'CllDeter
MID
( ..)
Max
( ..)
Mba
(ill) ..
Max
( )
MID Max
( .. ) ( ..)
"For clock periods other than the minimums shown in the table,
calculate parameters using the expressions in the table on the
follOWing page.
23
AC zeD CPU Z80ACPU Z80B CPU
Charac- Min Max Min Max Min Max
terlstics Number Symbol Parameter (us) (us) (us) (us) (us) (us)
(Continued)
39 ThBUSREQ(Cr) BUSREQ Hold Time after Clock 1 a a a
40 -TdCr(BUSACKf)-Clock 1 to BUSACK 1 Delay 120 100 90
41 TdCf(BUSACKr) Clock 1 to BUSACK 1 Delay 110 100 90
42 TdCr(Dz) Clock 1 to Data Float Delay 90 90 80
43 TdCr(CTz) Clock 1 to Control Ou!puts Float 110 80 70
DelaY.J!AREQ. IORO. RD.
and WR)
44 TdCr(Az) Clock 1 to Address Float Delay 110 90 80
45 - TdCTr(A) - - - Address Stable after MREQ 1.-- 160" 80" 35"--
IORO I. RD I. and WR 1
46 TsRESET(Cr) RESET to Clock 1 Setup Time 90 60 60
47 ThRESET(Cr) RESET to Clock 1 Hold Time a a a
48 TsINTf(Cr) INT to Clock 1 Setup Time 80 80 70
49 ThINTr(Cr) INT to Clock 1 Hold Time a a a
50 - TdMlf(IORQf) - Ml 1 to IORQ 1 Delay 920" 565" 365"--
51 TdCf(IORQf) Clock 1 to lORQ 1 Delay 110 85 70
52 TdC£(IORQr) Clock 1 to IORQ 1 Delay 100 85 70
53 TdCf(D) Clock 1 to Data Valid Delay 230 150 130
"For clock periods other than the minimums shown in the table,
calculate parameters using the following expressions. Calculated
values above assumed TrC = TIC = 20 ns.
Footnotes to AC Characteristics
TcC TwCh + TwCI + TrC + TIC TwCh + TwCI + TrC + TIC TwCh + TwCI, + TrC + TIC
2 TwCh Although static by design, Although static by design. Although static by design,
TwCh 01 greater than 200 /LS TwCh 01 greater than 200 JLS TwCh 01 greater than 200 JLS
is not guaranteed is not guaranteed is not guaranteed
7- TdA(MREQI) - TwCh + TIC - 75 - - - - TwCh + TIC - 65 - - - - TwCh + TIC - 50 - - - -
to TwMREQh TwCh + TIC - 30 TwCh + TIC - 20 TwCh + TIC - 20
II TwMREQI TcC - 40 TcC - 30 TcC - 30
26 TdA(IORQI) TcC - 80 TcC - 70 TcC - 55
29 TdD(WRf) TcC - 210 TcC - 170 TcC - 140
31-TwWR---TcC - 4 0 - - - - - - - T c C - 30 TcC - 3 0 - - - - - - -
33 TdD(WRI) TwCI + TrC - 180 TwCI + TrC - 140 TwCI + TrC - 140
35 TdWRr(D) TwCI + TrC - 80 TwCI + TrC - 70 TwCl + TrC - 55
45 TdCTr(A) TwCI + TrC - 40 TwCI + TrC - 50 TwCI + TrC - 50
50 TdMlf(lORQI) 2TcC + TwCh + TIC - 80 2TcC + TwCh + TIC - 65 2TcC + TwCh + TIC - 50
24
APPENDIX F •••• FLOPPY ERROR CODE
36
Table 8 STATUS REGISTER SUMMARY
ThIs Is • pnIIimNry spec:iIIcation wlIh tentative device parameters ... INV be IUIIjed to change . . . IInII procb:t cNI .... luIoI. Is
CCIfIIIIIeIed·
IrIIorIMIIOn ......... ~ WeIIem DigIIIII CorponIIIon Is believed to be .ccurIiIIt InCf ....... ~, no ,......, Is ....... ~
w..m DigIIIII CorpcnIIon for ill use; nor .., iillingll"'lInlS aI peIIInIS or 08ier rIghIS all*d ~ wIik:h INV ................ No
..... Is granIIId.~ IrnpIicIIIIon or 0IherwiIe under .., peIenI or paIIInI rigIiIS 01 WeItem DigIIIII CorponiIIon. WeIIem DigIIIII CoIpoqIon
.....".. . . right to change Uid drcuMry .. ..,.".. wIIiouI noIIcII.
354
TECHNICAL APPLICATION NOTES FOR THE SUPER QUAD SINGLE BOARD COMPUTER.
In case of problems with the SUPER QUAD: these are two thing a customer
may do:
1. send the product back for warranty service(turn around time is 1 day)
2. follow thw following notes and then if there are still no results do
the first stepl
1. If the board is totaly dead and won't communicate with the CRT, then
do the following:
a. check you power supply for 5,+,-12 volts.
b. check pins 1,3,17 of the U53(BR1941) baud rate gen. for step type
pulses.(if you do not see any thing on these- pins then replace the
BR194l chip)
I I I I I I
c. Check your PS NET/I the serial port adapter cable for possible
loss of + or - 12 volts or the 1488 chip.
d. check pin 3 of U11(74ls11). there should be a positive going
signal{about 5 volts) and when you press RESET you should see that
pulse going to ZERO voltage.
e. If the step d is OK then you have a problem with either on of the
a or b or c •
f. ~heck the 4MHZ clock signal 90in9 to pin 6 of the CPU.
2. If there is a problem with the floppy disk controller part only and
you think that the phase lock loop needs to be adjusted, then follow
the folowing steps:
a. This is done with the help of a dual trace scope.
b. put one channel on the 4MHZ signallPIN 6 of the cpu chip)
put the other channel on pin 7 of the U27(74sl24) and by tweeking
the R26(pot) those two signals are supposed to lock.
c. the above procedure is only recomended to engineeres or techriicians
with experience of doing such things before.
3. Make SUle the board is being properly cooled by a fan.
38
Application notes to run TURBO-DOS operating system:
If you have one of the early revisions of the SUPERQUAD check the following:
39
application notes on how to interface the Measurement Systems Memory (DMB6400)
to the SUPERQUAD.
HEADER 1 SHOULD BE WIRED AS: PIN ITO 16,3 TO 9,7 TO 11,8 TO 10.
41
SUPER NET MODIFICATION ~HEET
To run the SUPER aUAt) (Advanced Digl tal Corportion's S-10B single
board computer) with tbe BSR 64/256 (PCE Systems' 256K RAM card) there
are two ni 0 d 1 f i cat Ion s to be mad ~. to: the SUP E R GluAb. The fir s t
modification (as described. below) Is to buffer the Z-80 refresh
signal, and bring i t to pin 66 of the 5-109 bus (see figure 1).
Figure 1
Th-e -s'ec'ona-mooi-fi'catfon-ne-eas-to-be-- - ----- --~-----.--...--~-- +5VDC-
done so that the RAM card c~n sense
when the ze" is in a wait state. RM6
This is done by cutting the RA~ Jl
RFSH and FDC WAIT signals on the
SUPER "tVAI> away from the inputs of HOLD ~-+__r--+__~~B~U~S~R~E~___ Pin 25
US6, and ANDING them and tying the usa
result to PRDY of the 5-1"" bus XRDY
(see figure 2). Because PRDY may be PRDY Pin 13 )~-
wire from RM6, pin 2 to US7, pin 1. 3) Solder a wire from the plated
through hole located under U5S between pins 13 & 14, to US7, pin 1.
4) So 1 d era wi ref rom U5 7, pin 3 to U56,
US7. U56
Figure 3
',', f) C,- )./~ L c .
> /, I
,
! ~-
"
I _
" :~ J
12.0 Parts list
SUPER NET parts 1 ist
~~-~------------------------------------------------------~---------------
Item I Part Number I Location on board I Quantity
---------------1-----------------1-------------------- -I-------------~~---
1. I 74LS88 I U-ll I 1
2. I 74S94 I U-6 I 1
3. I 74LS04 I U-1S,U-34 I 2
4. I 7406 I U-32 I 1
~. I 7497 I U-l I 1
6. I 74LS18 I U-41 I 1
7• I 74LSll I U-ll I 1
8. I 74LS13 I U-47,U-56 I 2
9. I 74LS14 I U-2 I 1
1". I 74LS27 I U-35 I 1
11. I 74LS32 I U-42,U-22 I 2
12. I 7438 I U-14 I 1
13. I 74LS74 I U-33,U-40 I 2
14. I 74LS123 I lJ-3,U-4 I 2
15. I 745124 I U-27 1 1
16. I 74L5132 I U-16,U-39,U-46 1 3
17. I 74LS138 I U-21,U-36 . I 2
18. I 74LS139 I U-5 I 1
19. I 74LS153 I U-28 1 1
20 • I 74L517S I U-10 I 1
21. I 74L5240 I U-S9,U-24 I 2
22. t 745240 I U-68,U-69 I 2
23. I 74LS244 I U-8 1 1
24. I 74LS245 I U-44,U-S1 I 2
25. I 74LS273 I U-17 I 1
26. I 745287 (PROM) 1 U-49 I 1
27. I 74LS373 I U-2S,U-30 I 2
28. I 74L5374 I U-23 I 1
29. I 74LS393 I U-12,U-7 I 2
30. I MB4164-21 1 U-60 THRU u-67 I 8
31. I Z-8QA CPU I U-S0 I 1
32. I Z-80A PIa I U-9 1 1
33. I Z-80A DARTlSIO)I U-S2 I 1
34. I Z-80A eTC I U-37 I 1
35. I WD-1793(8877) 1 U-26 I 1
36. I WD-1691 I U-19 I 1
37 • I WD-2143 I U-20 I 1
38. I BR-1941 I U-S3 I 1
39. I TTLDM-100 I U-S4 I 1
4". I 2716 EPROM I U-29 I 1
41. I 8T97 I U-43 I 1
42. I 8T98 1 U-SS,U-lS 1 2
43. 1 14 PIN HEADER 1 U-31 1 1
44. I Lf4i323K VOLT. I VR1 1 1
45. I 8.00" MHZ XTAL I Yl 1 1
46. I 5.06 MHZ X'l'AL I Y2 I 1
47 • I 16 PIN SWITCH I SW1 I 1
48. 1 2N2222 TRANS. 1 01,Q2,04 I 3
49. I 2N3ge6 TRANS. I 03 I 1
1
50. I 78L12 I Q5 I 1
51. I 220 MH CHOKE I L1,L2 I 2
52. I 4.7K SIP I RM1,RMl,RM7 I 3
53. I 10K SIP I RM2,RM5 I 2
54. I 33 OHM SIP I RM6 I 1
55. I 220/330 SIP I RM4 I 1
56. I 33 OHM DIP I RMa I 1
57. I IN9l4 DIODE I CR2 I 1
58. I 5.1 V ZENER I CRl I 1
59. I 1"" MF CAP I C2 I 1
68. I .1 MF CAP I I 21
61. I 4.7 MF CAP I C6,Cl,Cll,C27,C281 8
62. I 10K POT I R27,R28 I 2
63. I 14 PIN HEADER I ·J4,J5 I 2
64. I 58 PIN HEADER I J3 I 1
65. I 40 PIN HEADER I J2 I 1
13.e Schematic diagram
8 7 6 5 4 3 2 1
REVISIONS
LZON E.1 LTR I DESCRIPTION APPROVED
I I I
J\
r-
o " 22 AOtJB
L'50'l -BJ\1 o
UI8 (2-<"1-)
.--t?
1'2.4 13. It. BAO L l~ BM/>
'L'5 ~1
A0
A7
A8
Al
If>
t7 D7 11
...--+_____1..
,T
"
11
6P5TVAL(2_Cl) 15
14
5lC5IS
DIOC.~
~-D5}
(3-(0)
U3& ,:, Ef[c.c,
(~-03)
U50
40 A10. A5 14 L5138 12 FOCCS (4-ce)
7. '5
e60 A12
Ali IS U30 6
A14 A12 Leo ~l?
" B
17 LS04
MI U34
AI4
c Ai'=» I~
I 2.
c
~1! 1~~U5~:8
U34 14 D0
)( RDY j \--~_--t---t_-5"-i usc:, L 504
D1
P R DY 12 i ~~12=e-+-,-~.q-'-l 15
'2. D2 A15 Il
~~ V DJ
D4 UII '3 J1
~
(2.-D5'1~
to
13
05
D7
1-'2=------t---1 1(0
r-
A\(0
I
01 I-~=-----t---i 17
L??NL-- V 02 ...,<D~---t---i 15
( 4-( 7) fi5f"WAiT 11.0
(~-f'>2.) PROM EN I -:.;/ V D3 e U23
t-"'''-----t---i 59
4
( 2 -c.2) WAif D4 L5~74 2
Ull
1-1,....2-----t--t" I
D'7 (.,-08) _~RD_ _ _---'~1-'U_4_1"" L5135
1-"",-5----;---1 (OZ
D7
1-".::."----;---1 (o~
1-,~~----;---1<D4 A'l3
d
I "-
~....8_____0=-j
o L':>lO"'-
3
RISrt .f~-DB~
(4-. Bl) III~
(2~1)~BUS~A-CK---4----~E~U~S~~~(~K~------------------------------__,
+BV B
B
GND
PINT
YIC
+IG,V
~
IDENnFYING NO. OR DESCRIPTION
I R.Mc.. +? 11.17
~ 1K.
12 8'- '-'0"-'7'------'1......
B ..2..
.-----IZ 3
90 007
DoD~oL..
PARTS LIST
_-J\e/\~A"1'.I'"!.v-"'I/~J-_---'1
UNLESS OTHERWISE SPECIFIED CONTRACT NO
Q+ (2.M, PD BIW. CD l' 7 RM1'
10K. +5 r--_ _
L.--
_ _ _ _ _ _--'
DIMENSIONS ARE IN INCHES
SUPER QUAD 5-100 BOf\RD
"-.-1 ~ I TOLERANCES ARE:
A
H-----t
21\12222
CIS
(HZ. \. i'iR"5"MON
('2.&z)(~.J;; RAMHJ
..11-96
!l
15
(2-87 ) soUT JI-46 1
'I
U49
PROM rl'
L
\0
- 2.3
W
;,.
,
+5
J
vv FRAcnONS
:t::
MATERIAL
DECIMALS
.XX :::':::
.xxx +
ANGLES
::!:
DRAWN ASG
CHECKED
APPROVALS
DESIGN':!
DATE
SCHEMATIC
UIB
L504 J"'} ( ' - -_ _ _ .:['~44-+
1 ...Ott~-iBi:.lO~A~Rl.l=D~....r.I;.:/:..:;O::...-_______________~.--______-,
3~) PRI-3
FINISH
So I CODE IDENT NO IDRAWING NO.
-1.0- "
D~ 40 ~\~~-----------_1 2 D0 ...'=5_ _ _ _ _-; 1 ARDY 2'7 I (HEADER) 14- I MI-I~
DI I .....,1tCL....._ _ _ _--I ~ 01 20 ...'. :. ."_ _ _ _ _- ; 3 rnRB U37
D2 ~ .....,'."'-2._ _ _ _ _ _ _---1 4 02 ...,'~'i _____---1 ') PM/) D2 11 12. U3\ 12. BAUOA
D3 2. !-'-1b=-_______- i OJ D3 4-0
...,..-'--------i 7 PAl D?
D4 ~ 04 U9 D4 21
.....,1=~_________---I~ rf=-3- - - - - - - - 1 <) PAl
05 D? U q
05 3 ~'...:..1---------t 7 ~f1~-----------Ill PA' I-
E'Q~-----,I~ 0& lJ 20
~1~b--------tB PA4 I
07 4 14 07 1 ...~~------i17 PA5 D7 <{
-
10 . - - 24
~10
~28 (4 -IB) POWER FAIL
Br-.UD A I ,.-- "0
~'1. L~~4
1300
~
9 5WI
&01 '; r~~Djl~-------------'~C utE:,
('L-B'll p.oe.. :;
BD2.. tJ BD2 II UI L707
BO? 7 BV3 llo L,) 131
e>D4- 13
If
R6
5D'" 14 t7 __-'\A.A.fU-_~J ~
/ &D0 15 21K 4.71L
V
807 501 16
987654~J
I 101( c y
B
D7 18 01 Q12 N~/C;;:....;.......~
RM5 ~.::::.D(O=--________---,-17':;D UI1 G 16 RE5E.T IMP(j-csj
B 05 14 D Q 15 PROMfN \'-I(Q")
I~--;.g",,;'---------"I~"'-Ig L'3113 Q~K
G 9 1:3 'i 9 RAMEIJ '-A~)
)
» RM.3 JI
D2 7 D 6 12 U2.8 '-
Df :3 D ~ is II L?1 '53 .,...-U_lo..,..,I-='-3_.....,3<L-_ _ _---I ftJ 1 ?I-lA mo Nl
D~ ~ D G2 10 II Q L'?i3'2
pl.=!.5_ _!..C
A _:;;e,~
&.:T- JJ 12. PROM O~
14 2 ~~~~~(~\-~A~~)~(I~-~~X~I-C~
PART OR NOMENCLATURE
IDENTIFYING NO OR DESCRIPTION
PARTS LIST
UNLESS OTHERWISE SPECIFIED CONTRACT NO.
DIMENSIONS ARE IN INCHES
TOLERANCES ARE: SUPER QUAD 5-100 BOARD
FRACTIONS DECIMALS ANGLES
A
.XX ±
.xxx ±.
ORAWNASG
APPROVALS
DESIGNS
DATE
11-19-81
A
MATERIAL
CHECKED
ADVANCED DIGITAL CORP.
SCHEMATIC
FINISH REV
Pi P2
61-_ _ _ _ _ _ _r i ;
----
T.lO
~--------=-...----ie; ")to
l5-_ _ _ _ _ _ _ _ _- - i C: ms
75188 _ - - -..... )8 i l l
om 8 L-----+-----fr-§~~,.~188--·---+------4\C DSR
__- - - - - - - -_____~t~D~S~~___~CD mR
en 5 em
~;.....;;;..-- ...... 20
lRX
~ AD 4 8k.l0
- .. _- --- ---~
.. "It.
1
~Afll' .. .aD
-11..
b8.:2.SS
t:NG. rl/A
_. LQ.~ I~ 121
P5 QII..AD/1
7 /lDr/d1'(ED _ I '.
.~-
oJ
6 t
5 t--~A---~_-t ~t)' 2-
7 1------1 74 L S t-.- - - - - - - J
q 244 - .. 1/
II -.------ S-
Q -~
IS" ?
11 8
" 9
l)/(' b 8 - 25 01\1
REV-C. ~~A~
..
i
;t,('! 8
1.~ I 74LS
:11 ~-.. -_··_--t
2 2 Lf 0 t-----------
'3, l--~- - = - - - - - 1
33 ~-------t
t, 7t-·--"-----t
" ----t
. . 't-'
;
~ PJ:jS
j
II I
I
I
LJ
PSq'tQtlJ>/ PA R
3- 2. 5- 92.
NOTICE
Return Authorization Numbers are active for 30 days after they are
issued. If the equipnent specified in the Return Authorization is
oot received by Advanced Digital within this 30 day period signi-
ficant delays in handling the repair may be incurred.
The warranty on the super quad is one year fran the date of purchase.