tcj_08 1984-06 02.04.pdf

(2319 KB) Pobierz
THE COMPUTER JOURNAL
For Those Who Interface, Build, and Apply Micros
Vol II, No 4
$2,50
us
Build a VIC-20 EPROM Programmer
Multi-user:
CP/NET
pllle8
plllel
Build a High-Resolution 5-100
Graphics Board
Part Three:Construction
pllge 10
System Integration
Part Three: CP/M 3.0
pllle 17
Linear Optimization with Micros
LSTTL Reference Chart
pllle23
pllle2S
Editor's Page
The Customer is Tired of Being Ignored!
Many of the companies in the microcomputer
industry have developed a very simple customer
relations
policy - they
just
ignore
correspondence and phone calls. This may have
been a cost-effective way of handling the problem
in an expanding market filled with eager and
unsophisticated buyers, but experienced business
people will not put up with this shoddy
treatment in the current buyer's market.
The microcomputer industry is still structured
around the pioneer companies started by a
technically oriented entrepreneur with little cash
and no business experience who ran the business
out of a spare bedroom. These undercapitalized,
understaffed enterprises made millions because
there was no competition, and because the
owners were too busy taking money to the bank
to worry about the customer. Their problem was
how to expand fast enough to meet the unfilled
demands. It didn't matter if the customer was
unsatisfied because the product was already paid
for (they don't give refunds if the product doesn't
work), and there were dozens of new buyers to
replace every lost customer.
Good documentation and customer support are
extremely important for business equipment and
software. With the large number of vendors
competing for your dollar today, your decision to
buy any micro product should be largely based
on how you will be treated by the company after
the purchase. In order to help you compare
customer support policies,
The Computer
Journal
is surveying vendors and will publish the
customer relations policy with the addresses and
phone numbers. We will also encourage them
to
submit bug fixes, customization notes, and
interfacing information for publication.
Realizing that what happens in the real world
is often different than the published policy, we
will also publish the experiences of our readers,
after giving the vendors the opportunity to
respond. We do need your experiences with
vendors (both the good and the bad) to help
others avoid the companies with poor products
and miserable customer relations.
Our loyalty is to our readers, and not to any
possible advertisers. We will not hesitate to
report bad products and poor customer support,
but we will need copies of correspondence and
records of phone calls which we can present to
the vendors prior to publication.
We have had a bad experience with a
computer system we purchased recently. We
wrote twice for information on an upgrade, but
they have not answered our letters. We liked
their product, but will not purchase any other
equipment from them or recommend their
equipment to anyone else. Weare sending copies
of the letters to the vendor for their reply before
publishing the details.
This magazine is published for you, and it will
only be as good as you make it. Take time to tell
us about your vendor experiences, and share
your
bug
fixes,
customization
patches,
interfacing information and technical tips with
the other readers.
EditorlPubluher
A rt Director
Techllical Editor
Productioll Auutallt.
COlltributillg Editor
Art Car180ll
Joall Thomp,oll
Lame Rose
Judie Overbeek
Ernie Brooller
The Computer Jou1"fl4lS
u
publuhed
12
times
a year. Anllual ,ub,criptioll
iI
S24
in tile U.S.,
SjO
in Canada, and
S48
airmail ill other
countries.
Entire c01ltent, copyright
©
1984
by Tile
Computer
JouT7l4l.
Po,tmalter: Send addreu cMnges to: Tile
Computer Joumal. P.O. Box
1697,
Kali8pelJ. MT
5990j-1697.
Addre"
all
editorial, advertiling and
,vb,criptwr. inqvire, to: Tile Computer Joumal.
P.O. Box
1697,
KalilpelJ. MT
59903-1697.
BUILD A VIC·20 EPROM PROGRAMMER
by
Neil Bungard
'
.
...
'III
• .11
Introduction
About a month ago I was presented with an interesting
problem. I had acquired a Z-80 based S-100 bus
microcomputer which had no operating software installed on
it. I had an operating system stored on paper tape, but I
needed the operating system on an EPROM before my
system would run it. The EPROM programmers that I
looked at were too expensive to justify buying simply to
program one EPROM, so I looked for an alternative
solution. It so happened that I had recently purchased a
VIC-20. so I decided to design an EPROM programmer
attachment for the VIC-20 and use the VIC-20 to transfer
the Z-80 operating software from the paper tape to the
EPROM. The VIC-20 solved my EPROM programming
problem with exceptional grace. With the VIC-20 and ten
dollars worth of additional hardware. I was able to enter.
inspect. program. and verify data on both 2716 (2K by 8) and
2732 (4K by 8) EPROMs. In addition. the VIC-20 EPROM
programmer has features not found on even the most
expensive EPROM programmers. Data to be programmed
into the EPROM can be entered from cassette tape.
5"
diskettes. any RS-232 device, from the VIC-20 keyboard. or
even from another EPROM.
Circuit Description
The VIC-20 EPROM programmer circuit diagram is shown
in Figure
1.
This circuit was designed to program 2716 (2K
by 8) EPROMs, but with minor circuit modifications the
VIC-20 can program 2732 (4K by 8) EPROMs as well. These
modifications will be explained in detail. and can be hard
wired or wired so that "personality modules" can be
inserted to select between programming 2716s or 2732s.
The VIC-20 EPROM Programmer performs four basic
functions:
1. It can set the address of where data trasfers are to begin
on the EPROM.
2.
It
can read data from a "read only" EPROM. This is used
in the EPROM duplicate mode.
3.
It
can read data from a "programable .. EPROM. This is
used in the program verification mode.
4.
It
can program an EPROM. This, of course. is used in the
program mode.
To obtain an understanding of the operation of the EPROM
programmer circuit in each mode, let us look at these four
basic functions separately.
The first function. address selection, is accomplished by
loading three presettable counters with the beginning
address of where you wish to store or retrieve data on the
EPROM. The counters are 74LS193s (lC 1.2. and 3 in Figure
1). The inputs of the counters are tied through buffers to the
data bus of the VIC-20. The outputs of the counters are
connected to the address lines of the 2716s so that the
values loaded into the 74LS193s will be present on the
address lines of the EPROMs. With an address value loaded
into the 74LS193s and present on both EPROMs. a memory
read from either EPROM or a memory write to the
programable EPROM can be accomplished. Once the data
transfer operation is accomplished, the selected address can
either be advanced in increments of one. or a new address
can be loaded into the counters.
Values are loaded into selected counters by the VIC-20 via
an Input/Output (I/O) device code generator (IC4). The
device code generator (a 74LS138) is a three line to eight
line decoder. Its three input lines are tied through buffers to
the thrt"e lowest order address bits of the VIC-20 address
bus. When the VIC-20 wants to accomplish an information
transfer leither Input or Output) it places the address of
where the data exchange is to take place onto pins 1. 2, and
3 of the 74LS138. The VIC-20 then pulses "BLK1" to a logic
O. This generates a device code pulse on one of eight output
pins on the 74LS138 which accomplishes a data transfer
to/from one of eight unique address locations defined by the
values of AO. AI. and A2. Table 1 shows the eight data
transfer pulses generated on the EPROM programmer.
Figure 2 is the timing diagram of the device code pulse
generated.
With reference to Table 1. the following software is
required to operate the device select hardware and set a
given address location for a memory transfer:
10 POKE 8195,0
20 POKE 8192.0
This program addresses memory location 0 (decimall on the
EPROMs. 10 POKE 8195,0 loads the four higher order bits
of the 12 bit address into address counter IC3 by placing the
high order address value on data bus bits DO through D3
and pulsing pin 11 of IC3 to a logic O. 20 POKE 8192,0 loads
the eight low order address bits into counters ICI and IC2
OIvlCl
.
'.
,"
'II
,II
.11
,;J
'''I
,~
Output
PIn
Df
Cod.
U
Df
DIYIc.
Cod.
Pul••
••
Addr•••
14LS13.
15 loads the 8 lower order bits of the address counter
8192
NA NA
8193
13 transfers data from" programmable" EPROM to the VIC 20
8194
12 Loads the 4 higher order bits of the address counters
8195
11 transfers data from" read only" EPROM to the VIC 20
8196
10 programs EPROM and increments the address counters
8197
NA NA
8198
NA NA
8199
·M
TIIIII 1
..
,y
+-
~,f'......
1(9
14lS(W
yHY
"0
22
*~
.....
1"
,
.
00
.
l...-
:z
00
~
10 1
,
"
----!1
---lA
...l!
"
,
A
--
,
1
-fu
...!
_...!!I
r---l
fL---4--+-+-l-I---1-H
Il---I-+--+-+-I-l--l-~
--.l
...I
----II
,
"0
1
I
,~e,~
,
3
A
,I~
113
-
74lS
1('
3
313
lL--
elL..-
ilL
• I",
0,
D,
,
"
fIL------jH-!-+-1H--1
,'
~
_c-
aw
7USJ73
7'lS1i3
74LS04
.IW.D
lC'C
'6'
14
7
12
0,
IC I
r-+-+-.j-I!.<j
Do
71~l3S
2716
7':.S:311
1US367
74lS2'5
14
16
16
16
I
I
II
~--+-+-+-+-"l
0,
ill-
74lS
"l5Oa
,..,
,.---+-+-++J.lIl
°A
~-+--+-H-'1'
iL---+--+-I--+-+-+-I.-4
• Ao
L......-ll
~
0,
10
fL---+-----jf-+-+-H
r-+-+-+-+..I.>l 04
~~~
fL--+----+--+--H
L-.J,
3
II
OOf--+---------+--H-!-+-H--+-+-Hl.!l
10
L....~
10
c'GHO
,.
'0
-~,
I.pa,,,
f-I->-l
~~
I~
....,
""
1(3
g
,
,
J
143
r3-H-+-+~-----...Llj
".
,
"
,
"
I
I
'0
I"
16
A
14
"
,,,,
14
]til
~~'
00
fL-~
0,
t-L-~
0,
fL-'
0,
~A
O.
I
13
"43
7
~
,
0,
O.
0,
"
II 1
'10
e,
I(A
f!-- •
-
.
"
f!.-
'
I
2716
'0
I
3
2
Ie
13
104LSOI
-
_
ILKl
Meft'lGry
lq,wl".1ofI
~
1
'~
"
111
.ll
IIral...U
03
00
f-'-WI
,.'-llL"-------+---+--------+------_~H--.J
'---------4-----;:----++---.J
~
O'fIll'...lIll!LI-
---1rl
U
0.
02L1.l"...ll'"t!:l ..
'I.:1L...
J.la.,\
,...".
:;.--
~
"
, 1
~
e
f-------"
10~
1(12
I"-----"-'l
f ,
3.,
IC4
..
..... 30'
'O~
fL-----ij
,m.
1!9
74LS04
'I
Figure 1
-
advanced. Details of this sequence will
be
discussed further
in the explanation of the programming mode.
The important thing to remember in our discussion thus
far is that for the purpose of reading either EPROM, the
READIPROGRAM switch must be in the READ position.
The second instruction 20 FOR I - 0 TO 50: NEXT I
is
a
software time delay
to
allow the monostable
to
time out
before any other instructions are executed. Even though the
50ms pulse
is
only used in the programming mode it
is
still
generated in the read and verify modes
to
advance the
counters. It is the trailing edge of this pulse that always
advances the address counters and thus must
be
accounted
for in all the modes of operation.
The second basic function performed by the EPROM
programmer
is
reading data from the "read only" EPROM.
In order to do this. the memory address of where the read
operation
is
to
oceur
is
loaded into the memory address
c:ounters
u
previously explained. Next. a memory read
operation
is
performed by the VIC·20 which generates an
input device code pulse on pin 11 of the device code pulse
generator IC4. Pin 11 of IC4 is connected
to
the chip select
by placing the EPROM address value on the data bus and
pulsing pin 11 of IC1 and IC2 to a logic
O.
To advance the
counters. which increments the selected address. the
following instructions are required:
10 POKE 8197.0
20 FOR 1-0 TO 50: NEXT I
POKE 8197,0 generates a device code pulse on pin 10 of the
74LSl38 (IC4). This low going pulse triggers a monostable
multivibrator (IC10). which is configured to generate a 50ms
high-going pulse. This 50ms pulse
is
required in the EPROM
programming sequence which will be discussed later. The
output of the monostable (pin 3, IC10) is connected. through
an inverter. to the "uJrCount" input of ICI.
If
the
READIPROGRAM switch (Sl, Figure 1)
is
in the READ
position (open), the selected address will be advanced by one
when the monostable times out. but no EPROM memory
location will be programmed. However. if the
READIPROGRAM switch
is
in the PROGRAM (closed)
position when the POKE 8197,0 instruction
is
executed.
address location 0 (decimal) on the programmable EPROM
will
be loaded with a 0 before the address counter (ICI) is
4
The Computer Journal
BlU
-
DIu
T,."......
y
~
--
x=
>C
'dati
transl.
AOcIrtIS
=:x
HHoh Z
VIIiOlClGrlU
x:=
I
r
programming sequenee is shown in Figure
4.
The
data
is
applied to the EPROM by the VIC·20 through a memory
write operation to location 8197 (decimal). This memory
write operation generates a device code pulse on pin 10 of
IC4 which latches the outputted data byte into IC7 and
triggers the monostable multivibrator (ICI0l. The
monostable applies a 50ms high·going pulse to pin 18 of the
EPROM and programs the applied memory address with the
data byte latched in IC7. The falling edge of the 50ms
programming pulse automatically advances the counters and
prepares the next memory address for programming. The
following software is required to program address location 0
with decimal value of 100:
10 POKE 8195,0
20 POKE 8192,0
30 POKE 8197.100
,4
"~
Cs
0utP\Il
DIu
¥ItIClOl'lI
Oo¥tco
COllI
AdcI_
===x
-~
,
--w--
F!gUr12: Device Code Pulse Timing.
Figure 3:
2716
Read Timing.
",
,,,,
.,
,J
(CS) input of the read only 2716 UC6). When the CS input
(pin 20) is pulsed low (with pin 18 tied low and pin 21 held
high) data llows from the memory location addressed on the
EPROM into the VIC·20. Figure 3 shows the timing diagram
of the 2716 read operation. The following software is
required to perform the read only EPROM read operation:
10 POKE 8195,0
20 POKE 8192.0
30 A • PEEK(8196)
The BASIC instructions in lines 10 and 20 set the memory
address of where the read operation will occur. These two
instructions have been previously explained. The instruction
30 A. PEEK(8196) generates a device code pulse on pin 11
of IC4 which inputs the data from the addressed memory
location. and assigns the data to the variable name
"A".
The third basic function performed by the EPROM
programmer, reading data from the programmable EPROM,
is accomplished in exactly the same manner as reading from
the read only EPROM. The only difference is that a device
code pulse is generated on pin 13 of IC4 instead of pin 11 as
in the case of the read only EPROM. Pin 13 of IC4 is
connected to the CS input of the programmable EPROM (pin
20. IC5) and to the output enable (OE) of an octal tristate
buffer (pin 1. IC8). Data flows out of this EPROM and
through the buffer when pin 13 of the 74LSI38 is pulsed low.
For the read operation to be accomplished. pin 18 of the
2716 must be at a logic 0 and pin 21 at
+
5 volts. The
software required to read data from the programmable
EPROM is:
10 POKE 8195.0
20 POKE 8192.0
30 A • PEEK(8194)
The fourth and last funetion performed by the EPROM
programmer
is
programming an EPROM. To enter the
program mode. the READIPROGRAM switch must be
placed in the PROGRAM position. This applies
+
25 volts to
pin 21 of the EPROM UC5). and configures the EPROM
to
be programmed. Be sure that the 25 volt supply
is
stable
and at no time fluetuates higher than 26 volts. A volu.e
p-eater
tlwl
Z6 volt.
08
pia
21 of the EPROM
w01
iauDecUately de.troy the EPROM. Next. as was the case
when reading the EPROMs. the memory address of wbere
the data transfer is
to
take place must be loaded into the
address counters. By applying an address
to
the EPROM.
placing pin 21 at
+
25 volts. and insuring that tbe CS input
is
at a logic 1. the EPROM is ready
to
be programmed.
Applying a data byte on DO through D7 of the EPROM. and
pulsing pin 18 (PDIPGM)
to
a logic 1 for 50ms completes the
programming operation. The timing diagram for the 2716
AppUeatioD Software for the VIC·20 EPROM
Programmer
,<iI
The software required to read. verify, and program 2716
j,,..
EPROMs will be presented in the following discussion on
application software. To perform an EPROM duplication. the
,4
contents of a previously programmed EPROM is transferred
into the VIC·20's RAM memory. Here the data can be''''
inspected and/or modified .if desired. The data is then
j,4
transferred to a blank EPROM. and a verification
is
accomplished
to
ensure that no error occured in the data ' 4!
transfer. The following software reads the 2048 memory
locations of a 2716 and places the data into the VIC·20's ."
RAM memory between locations 5000 (decimal) and
7048(decimal). Insure that the READIPROGRAM switch
is
''4!
in the READ position. and that the EPROM to be read is
,oil
inserted into the read only EPROM socket:
10 PRINT ''''
20 PRINT "SET SWITCH TO"
30 PRINT "READ POSITION"
40 PRINT
50 PRINT "HIT RETURN"
60 PRINT "TO START"
70 INPUT X
80 POKE 8195.0
90 POKE 8192.0
100 FOR 1- 5000 to 7048
110 A- PEEK(8196)
120 POKE I,A
130 POKE 8197.0
140 FOR T- 0 to 50:NEXT T
150 NEXT I
160 PRINT"READ COMPLETE"
170 STOP
I
clear screen
I"
r·iiI
lensure that
IREAD/PROGRAM
Iswitch is
In
I
correct position
lload
high-order 74LS193
lload
low-order 74LS193
I
set
2048 RAM spaces
Iread EPROM
I
store value in RAM
ladvance counters
Iwait for 50ms pulse
Ito
read
next
location
I
prompt user
,,.
,oil
-00
not enter comments in right hand column as part of
"ill
program.
Once the data is in RAM memory. the user can check the
code
to
ensure tbat the correct. 2716
is
being duplicated. ,"
and/or make minor modifications
to
the code. Once satisfied
with the data in RAM. the data
is
transferred to a blank ."
EPROM which has been inserted into tbe programmable ,..
EPROM socket. Before the transfer takes place. the
READIPROGRAM
switch must be placed in the
,t
Zgłoś jeśli naruszono regulamin