Z80 Microprocessor Kit Construction Manual
Transcript of Z80 Microprocessor Kit Construction Manual
Z80 Microprocessor KitConstruction Manual
Z80 MICROPROCESSOR KIT CONSTRUCTION MANUAL
CONTENTS
INTRODUCTION.....................................................................................3
COMPLETE ASSEMBLED KIT...............................................................4
PREPARING FOR ASSEMBLY...............................................................5
ASSEMBLY STEPS................................................................................6
TROUBLESHOOTING...........................................................................25
PARTS LIST............................................................................................27
2
INTRODUCTION
This construction manual provides steps to assemble the Z80 microprocessor kit.
Preprogrammed IC chips are 1) monitor ROM 27C256, 2) Programmable Logic Device, PLD GAL16V8 and 3) AT89C2051 microcontroller.
Be advised, 95% that causes not working circuit is from soldering! Good soldering point makes the current flow easily. Bad soldering points may causes high impedance path, consequences the distorted pulse signal! The Z80 will not functioning properly!
When pick the PCB, do not touch the soldering pad! Pick it with the board border only!
For those who live in dry and cold area, electrostatic discharge may zaps the CMOS chips. Keep them at the low impedance sheet, like aluminum foil.
3
COMPLETE ASSEMBLED KIT
4
RS232C connector, DB9 male
32kB Static RAMDC jack +9V
Preprogrammed monitor ROM
Z80 CPU
SW4, slide switch selects between INTR key or 10ms tick
LCDContrast adj.
Homemade keypad sticker using Inkjet printer (vector file is available for download)
Preprogrammed microcontroller
Preprogrammed PLD
PREPARING FOR ASSEMBLY
Tools
1. The example of soldering tools is shown below. Main tools are soldering iron, solder lead,wire cutter. Voltmeter is for checking +5V power supply.
Author also has the logic probe, it can check the oscillator running easily. No need the expensive oscilloscope.
5
ASSEMBLY STEPS
□ 1.Check the PCB, no wire or conductive parts on both sides. Remember do not touch
the PCB pad with finger. Pick it at the board border. The board comes with presoldered transient voltage suppressor, D2.
6
□ 2.Check the transient voltage suppressor, D2 on the PCB. The gray line on the chip is
cathode pin! It must be soldered as shown below.
□ 3.We begin with low profile devices. Insert Y1, XTAL 3.579MHz. To prevent the Xtal
case touch the PCB, we may use two pieces of tick paper insert at the bottom. Use one finger press it while soldering at the soldered side.
7
□ 4. Insert C1, 100pF ceramic disc capacitor then followed with resistors. Place them in
axial direction.
For resistors and capacitors, we can bend the legs to make it in place. So we can solder it easily.
8
Finished soldering point should look like this.
Remember, place the soldering iron's tip to touch to the pad and leg for 1-2 seconds, then put the solder wire at the tip, count one, two three, then take them out.
Do not lift the tip up and down! Enough solder will make the finished work like PAGODA and looks shine!
Cut the legs, we can insert another parts.
9
□ 5. Now insert multilayer capacitors, 100nF and R12, R PACK. Solder it.
□ 6. Insert R16, R PACK. Pin 1 of R pack is a dot point! Soldering R pack many need
your finger to press it.
Then insert and solder electrolytic capacitors, 10uF. All electrolytic capacitors has polarity. Longer leg is positive, put it to the square footprint (with + indicator)!
10
□ 7. The voltage regulator, 7805 is TO220 package, we can bend the legs like this.
The TAP pin is GND for heatsink. We can solder it to the pad directly. The ground plan will be heatsink of the voltage regulator. You can tighten the TAP to the PCB with M3 nut and washer as well.
11
□ 8. We can insert the IC socket and the rest parts.
For seven segment LED, we may solder only one pin beforehand. Then check the position, both should be line up on the same level.
We can adjust them by putting the solder tip, to make it slightly movable. Use finger to move it, make it in position.
12
□ 9. The dot LED has polarity!, the flat side is CATHODE pin! The footprint for LED
has square one for ANODE pin! Solder it only one pin beforehand, so we can adjust it in position easily. When it was in good position, finish the rest pins.
Again SW4 is not easy to stand, just solder one pin, then adjust the position with finger while soldering.
D14 also has polarity. Cathode pin has black line!
Q1 and Q2 are PNP transistors. Place them in position the same as symbol on the PCB!
13
□ 10. Insert DC jack, the positive pin will need a saw files for trimming.
Insert D4, protection diode. Insert C6, it has polarity! Recheck before solder them.
14
C4 can be placed axially to make it looks good.
15
VB1 is DB9 male type connector.
16
□ 11. Insert TACT switches, 36 keys. Key must be pressed until locked with clicking
sound!
Then solder it. To make sure that all keys are in placed, turn the board back, recheck all keysare the same level! Some key may springs back, press it until click!
17
□ 12. Small speaker can be placed at the bottom layer and have hot glue to fix it.
18
□ 13. Before insert the IC chips, check +5V by powering the board with AC adapter.
The DC input accepts from +9VDC to +12VDC. The 7805 needs at least +2V dropped voltage. Use a volt meter check at test points TP1+5V and TP2 for GND pin. If it was nearly+5V, it works fine. Then remove the power.
Insert the IC chips carefully. Recheck the pin position. See the example below picture.
19
Pin 1 has indicator on the IC chips. Shown Zilog Z80 CPU and monitor EPROM, 27C256.
The quartz window of the EPROM can be opened for showing student to see the silicon chip.
However if you like to close it with small sticker, then you can make it. The normal light or even sunshine can not kick the charge that stored in the floating gate of the FET in the CMOS structure. To kick it, you will need strong UV with wavelength about 253.7 nm.
Read more at http://en.wikipedia.org/wiki/EPROM
20
Text LCD with 16-pin socket for plugging to the 16-header on the board.
Remember, plugging/removing the LCD must be done when the board is powered off!
21
Your first computer shall look like this when powers it on. For LCD, adjust R18 to make thefirst line appears.
Building the computer is easy and fun!
Let us test the Z80 to execute our program by entering the Z80 instructions in hex code.
Press key PC, 3E, +, 01,+, D3,+, 40,+ , 76, PC, GO.
Did you see the binary number 0000 0001 on the GPIO1 LED? We program the Z80 to write the accumulator contents to the 8-bit GPIO1. This brings the internal data to outside realworld!
The program is simple. It has only three instructions. The hex code is only five bytes.
1800 3E 01 LD A, 1 ; load accumulator with 11802 D3 40 OUT (40H),A ; write to port 40H1804 76 HALT ; Halt the CPU
22
You can change the value to be loaded easily at the 2nd byte located at address 1801. Then see the change when press key GO again. How easy it is!
Another example of displaying text on LCD. After the LCD initialized, we can use built-in LCD drivers to print text or ASCII letter on screen. We will learn how to use LCD with the Z80 programming lab book.
23
Before take a rest after completed assembly, let us enter the hex code for running LED.
line addr hex code label instruction comment---- ---- -------- ----- –------------ –-------------- 0001 1800 .ORG 1800H0002 1800 0003 1800 GPIO1 .EQU 40H 0004 1800 0005 1800 3E 01 MAIN LD A,10006 1802 0007 1802 D3 40 LOOP OUT (GPIO1),A0008 1804 CD 0C 18 CALL DELAY0009 1807 CB 07 RLC A0010 1809 C3 02 18 JP LOOP0011 180C 0012 180C 0013 180C 11 FF FF DELAY LD DE,-1 0014 180F 21 00 10 LD HL,1000H 0015 1812 19 LOOP2 ADD HL,DE 0016 1813 38 FD JR C,LOOP2 0017 1815 C9 RET 0018 1816 0019 1816 .END0020 1816 tasm: Number of errors = 0.
The program is simple forever loop writing the accumulator contents to the GPIO1 LED.
Let us entering the hex code with hex key and + key now.
Started at 1800, 3E, 01, D3, 40, CD, 0C, 18,..... until 38, FD and last byte C9. Then press PC, GO. What is happening?
Then take a rest and have your time to learn more how to program the Z80 with the lab book.
Have fun!
24
TROUBLESHOOTING
PROBLEM CAUSE ACTION
No display, no power LED 1. no power from AC adapter2. wrong polarity jack3.wrong direction of protection diode, D4
1. Check AC outlet2. correct the jack polarity, use new adapter3. correct diode direction
No display, power LED lit 1. wrong IC chip insertion2. wrong monitor program3. wrong PLD code4. oscillator is not running5. CPU is not reset
1. correct chip position2. reprogram the monitor EPROM3. reprogram PLD4. check XTAL soldering, R1and R2 must be 1k, C1 must be 100pF5.wrong C2 polarity, check TP4 with logic probe, press RESET key will make it logic “low”.
No display on GPIO1 LED 1. wrong direction of D142. wrong direction of LED
1. correct the direction2. correct Cathode/Anode pins
No beep when press key 1. no speaker2. wrong position of Q2
1. solder the speaker2. correct the position of Q2
Heat up at voltage regulator, U9 7805
1. DC input is much higher than +7V
1. Lower input DC voltage
No display on LCD 1. wrong insertion position 1. correct the position
No back-light on LCD 1. no R17 installed2. R17 is higher resistant3. LCD module has no back-light4. back-light pins is not the same as schematic
1. install R172. use 5-10 Ohms for R173. use LCD module with back-light4. use LCD module with correct back-light pins
Load/Send hex file problem 1. terminal is not set correct format2. Z80 kit stops loading
3.RS232 cable is not cross cable.
1. set terminal for 2400 bit/s, 8-data bit, no parity, one stop bit, no flow control.2. File is not Intel HEX file.Ensure the file is Intel HEX file.3. check the cable, it must be
25
4. Send hex file displays unreadable letters
cross cable
4. correct terminal settings.
10ms tick LED, D15 is not blinking
1. wrong polarity of D152. AT89C2051 is not programmed
1. correct the polarity2. reprogram the microcontroller
Some key has no response 1.not yet solder it 1. check and solder it
26
PARTS LIST
Semiconductors
U1 Z80 40-pin DIP microprocessorU2 27C64 or 27C256 EPROMU3 HM62256B 32kB SRAMU4 74LS14 inverterU5 74HC74 Dual D-type flip-flopU6 GAL16V8B programmable logic deviceU7 74LS90 decade counterU8 AT89C2051 20-pin microcontrollerU9 LM7805/TO voltage regulatorU11,U10 LTC-4727JR 4-digit 7-segment LEDU12,U14,U16 74HC573 8-bit latchU13 CD4001 quad NOR gateU15 74HC541 tri-state bufferU17 MAX232A rs232 converterD1,D6,D7,D8,D9,D10,D11, 3mm LEDD12,D13,D15D2 TVS5V_SOD123 transient voltage
suppressorD4 1N4007 rectifying diodeD14 1N5226A +3.3V zener 500mW Q2,Q1 BC557 PNP transistorD3 POWER 3mm LEDD5 TONE 3mm LED
Resistors (all resistors are 1/8W +/-5%)
R1,R2,R9 1kR3,R4,R5,R6,R8,R1810KR7,R19 680 OhmsR10 2kR16,R12 10k RESISTOR SIP 9R13 4.7kR14 330 OhmsR17,R15 10 Ohms
Capacitors
C1 100pF ceramicC2,C3,C15,C16,C17 10uF electrolyticC4 100uF electrolyticC5 10uF 16V electrolyticC6 1000uF 16V electrolyticC7,C8,C9,C10,C11 0.1uF multi layerC12,C13 0.1uF multilayerC14 10uF 10V electrolyticC18 0.1uF multilayer
Additional parts
JP1 HEADER 20X2JR1 CONN RECT 16 pinsJ1 DC input JACKJ2 HEADER 3 pinsLS1 8 Ohms SPEAKER
SW1 RESET 12mm tact switchSW2 INTR 12mm tact switchSW3 MONITOR 12mm tact switch SW4 slide switch-SPDT
S1,S2,S3,S4,S5,S6,S7,S8, 12mm TACT switchS9,S10,S11,S12,S13,S14,S15,S16,S17,S18,S19,S20,S21,S22,S23,S24,S25,S26,S27,S28,S29,S30,S31,S32,S33
VB1 DB 9, Male connectorY1 XTAL 3.579MHzPCB double side plate through holeLED cover Clear RED color acrylic plasticKeyboard sticker printable SVG file
27
55
44
33
22
11
DD
CC
BB
AA
0x0000-0x0FFF (4kB)0x1000-0x8FFF
Tick 100Hz
select INTR source
Expansion Bus
Programmable timer
<Doc>
2
Z80 MIC
RO
PR
OC
ES
SO
R K
IT
B
13
Saturday, January 17, 2015
Title
Size
Docum
ent Num
berR
ev
Date:
Sheet
of
INT
HALT
MR
EQ
IOR
QA6A7A12
RO
MC
ER
AMC
E
D5
D3
D7
D0
D2
D4
D6
D1
M1
NM
I
A15A14A13
XTAL
RD
WR
WAIT
BU
SR
Q
A0
A12A13
MR
EQ
D0
A15
A1A4
A15
WAIT
BU
SAK
INT
HALT
D4
D1
D1
BU
SAK
A11
A13
A10
D6
D0
A14
RAM
CE
A6
MR
EQ
CP
U_C
LK
M1
D3
D2
A4R
D
BU
SR
QC
PU
_CLK
A3A10
A12
A5
WR
D3
A1
D0
D4
D5
A2A9H
ALT
*RE
SE
T
DC
2
A0
A6A8
RD
WR
A8
D5
A5A6A9
D4
D0
D5
D3
A0
A7A13
BU
SR
Q
RD
A12
D7
A5
A0A7A10
IOR
Q
RD
A4
D3
D6
D4
A9
INT
CP
U_C
LK
*RE
SE
T
NM
I
D7
WR
RO
MC
E
A2D
7
D2
A1
A11A11
D1
D1
XTAL
A2
RFS
H
A3
A1M
1
A14
A7A8
IOR
Q
D6
D2
D5
A3
A14
WAIT
D6
D2
D7
RFS
H
PO
RT0
PO
RT1
PO
RT2
D0
D6
D1
D7
D5
D3
D4
D2
BR
EAK
GP
IO1
LCD
_ER
D
WR
RE
SE
T
TXD
A0
RE
SE
T
A1
VCC
VCC
VCC
VCC
VCC
+5V
VCC
VCC
+5V
VCC
VCC
VCC
VCC
VCC
VCC
VCC
VCC
VCC
U4C
74LS14
56
U1
Z80
3031323334353637383940123451415128791013
271920222128182416172625236
29
A0A1A2A3A4A5A6A7A8A9A10A11A12A13A14A15
D0
D1
D2
D3
D4
D5
D6
D7
M1
MR
EQ
IOR
QW
RR
D
RE
FSH
HALT
WAIT
INT
NM
I
RE
SE
T
BU
SR
QB
US
AK
CLK
VSS
SW
2IN
TR
C11
0.1uFC
90.1uF
C1
100pF
U4A
74LS14
12
R8
10k
D4
1N4007
12
+C
3
10uF
D1LE
D
+C
5
10uF 16V
R7
680
U8AT89C
2051
1
1213141516171819
20 236789
11
54
RS
T/VPP
P1.0/AIN
0P
1.1/AIN1
P1.2
P1.3
P1.4
P1.5
P1.6
P1.7
VCC
P3.0/R
XD
P3.1/TX
DP
3.2/INTO
P3.3/IN
T1P
3.4/T0P
3.5/T1
P3.7
XTAL1
XTAL2
SW
4213
U4B
74LS14
34
C8
0.1uF
U2
27C64/27C
256
1 10987654325242123220 2227
1112131516171819
26
VPP
A0A1A2A3A4A5A6A7A8A9A10A11A12
CE
OE
PG
M
O0
O1
O2
O3
O4
O5
O6
O7
A13
U5B
74HC
74
1211
98
1013
DCLK
PRCL
U7
74LS90
1412367
129811
ABR0(1)
R0(2)
R9(1)
R9(2)
QA
QB
QC
QD
C12
0.1uF
Y1
3.579MH
z
TP3
CLK
1
C10
0.1uF
J1D
C input
1
2
R4
10k
+C
4100uF
R5
10kR
610k
U3
HM
62256B
109876543252421232261202227
1112131516171819
A0A1A2A3A4A5A6A7A8A9A10A11A12A13A14
CE
OE
WE
D0
D1
D2
D3
D4
D5
D6
D7
D2TVS
5V_SO
D123
TP4
RE
SE
T
1
C13
0.1uF
U4D
74LS14
98
R10
2k
R2
1k
SW
1
RE
SE
T
TP1
+5V1
R9
1k
R1
1k
D15
LED
D3
PO
WE
R
C18
100nF
U6
GAL16V8B
111
1213141516171819
23456789
I/CLK
I/OE
I/O/Q
I/O/Q
I/O/Q
I/O/Q
I/O/Q
I/O/Q
I/O/Q
I/O/Q
IIIIIIII
R19
680
U5A
74HC
74
23
56
41
DCLK
PRCL
C7
0.1uF
TP2
GN
D1
R3
10k
+C
61000uF 16V
SW
3
MO
NITO
R
+C
210uF
U9
LM7805/TO
1
2
3VIN
GND
VOU
T
Q1
BC
557
1
2
3
JP1
HE
ADE
R 20X
2
12
34
56
78
910
1112
1314
1516
1718
1920
2122
2324
2526
2728
2930
3132
3334
3536
3738
3940
55
44
33
22
11
DD
CC
BB
AA
0x00 0x01
0x02
0x01
7-segment test
<Doc>
2
Z80 TRAIN
ER
KIT
B
23
Saturday, January 17, 2015
Title
Size
Docum
ent Num
berR
ev
Date:
Sheet
of
D0
D5
D2
D4
D7
D3
D1
D6
ABCDEFGDP
C GAD F EDP
BF BDD
P
C AG E
PC
0
PA0
PC
2P
C3
PC
1
PC
4P
C5
PA1
PA2
PA3
PA4
PA5
PA0
PA1
PA2
PA3
PA4
PA5
PA6
SP
EAK
ER
PA6
PC
5
PC
1P
C2
PC
3P
C4
PC
0
D6
D4
D2
D2
PC
2
D7
SP
EAK
ER
PC
7
D5
D6
D0
PC
4P
C3
D7
D4
D7
D4
D1
PC
6
PC
1
D0
D1
PC
5
PC
0
D2
D0
D3
D1
D6
D3
D3
D5
D5
D2
D4
D3
D5
D1
D0
D6
D7
PO
RT0
PO
RT1
PO
RT2
RE
SE
T
RD
WR
WR
BR
EAK
VCC
TXD
RX
DVC
C
+5V
VCC
VCC
VCC
VCC
VCC
VCC
+5V
S23
S30
S24
U11
LTC-4727JR
1416133511157
1
2
6
8
4
ABCDEFGDP
DIGIT1
DIGIT2
DIGIT3
DIGIT4
L1L2L3
S25
S27
S26
S28
U13B
4001
564
S19
S33
R1510
LS1
SP
EAK
ER
U12
74HC
573
1 1120
1918171615141312
23456789
OE
LEVCC
1Q2Q3Q4Q5Q6Q7Q8Q
1D2D3D4D5D6D7D8D
U13C
4001
8910
S32
S1
S2
S3
U4F
74LS14
1312
S4
C
R16
10k RE
SIS
TOR
SIP
91
23456789
S5
D5
TON
E
S6
C
R12
10k RE
SIS
TOR
SIP
91
23456789
R134.7k
S7
S8
S31
S9
U4E
74LS14
1110
S10
S11
R14
330
U14
74HC
573
1 1120
1918171615141312
23456789
OE
LEVCC
1Q2Q3Q4Q5Q6Q7Q8Q
1D2D3D4D5D6D7D8D
S12
U15
74HC
541
23456789
119 1817161514131211
20
A1A2A3A4A5A6A7A8
G1
G2
Y1
Y2
Y3
Y4
Y5
Y6
Y7
Y8
VCC
S13
S14
S15
S16
S17
S18
U13A
4001
123
S20
Q2
BC
557
1
2
3
S21
J2CO
N3
123
S29
S22
U10
LTC-4727JR
1416133511157
1
2
6
8
4
ABCDEFGDP
DIGIT1
DIGIT2
DIGIT3
DIGIT4
L1L2L3
55
44
33
22
11
DD
CC
BB
AA
8-bit Binary display LED x8
RS R/W
16x2 text LCD interface
0x40
<Doc>
1
Z80 TRAIN
ER
KIT
B
33
Saturday, January 17, 2015
Title
Size
Docum
ent Num
berR
ev
Date:
Sheet
of
D6
D1
WR
D6
D3
D4
D5
D4
D5
D1
D7
D7
D0
D2
D0
D2
D3
D1
D4
D6
D0
D7
D5
D2
D3
A0 A1
WR
RD
GP
IO1
D6
D7
D2
D0
D5
D1
D4
D3
LCD
_E
RE
SE
T
VCC
A0A1
TXD
RX
D
VCC
WR
RD
VCC
+5V
+5V VCC
+5V
VCC
+5V
VCC
+5V
+5V
D10
D9
D8LE
D
D7
D14
1N5236A
D6
VB1
SU
B-D
9, Male (cross cable)
594837261
+
C15
10uF
+
C14
10uF 10V
JR1
CO
NN
RE
CT 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+
C16
10uF
R17
10
+
C17
10uF
R18
10K
13
2
U17
MAX
232A
138
1110 1345
26
129
147R
1INR
2IN
T1INT2IN C
+C
1-C
2+C
2-
V+V-
R1O
UT
R2O
UT
T1OU
TT2O
UT
D13
D12
U16
74HC
573
1 1120
1918171615141312
23456789
OE
LEVCC
1Q2Q3Q4Q5Q6Q7Q8Q
1D2D3D4D5D6D7D8DU
13D
4001
121311
D11
LED
NOTE
28