Initialization Aid For Printers: A. Rigby
Initialization Aid For Printers: A. Rigby
Initialization Aid For Printers: A. Rigby
You are working ha rd on a BASIC pro- Basic operation sure stable levels on the datalines. After
gram which is almest finished, and hard the 5 I ROBE output line is actuated, the
copy on paper is required to da the final The flowchart in Fig. 1 illustrates the basic circuit en tera a wait loop to allow the
debugging. Since the program is fairly operation of the circuit, which is inserted printer to process the databyte. Depend-
long, you think it wise to set the printer to between the compurer's Centranics port ing on the position of jumper [Pr, the cir-
condensed characters at 8 l.ines per inch. and the parallel input of the printer. The cuit waits for a negative pulse transition
The printer manual is consulted and the diagram shows the functional blocks in on the BU5Y or ALK handshaking line
following command is typed in the direct the circuit as well as the interrelated tim- from the printer. When the transition ar-
command mode of GWBASIC: ing at which these blocks operate. rives, the EPROM address counter is in-
At power-on, the circuit is reset and cremen ted by one. The counter starts at
LPRINT CHR$(15);CHR$(27);"O"; forms a straight 36-way connection be- the lowest address, rul, by virtue of the
tween the computer's Centronics por t and power-on reset. and the fact that the cir-
We think you will agree that pushing a the Centronics in pu t on the printer. No cuit stops automatically when the counter
small button on the printer initia lization change is made to the previously estab- reaches nil. In the latter ease, the "all 16
aid is a lot easier than having to look up Iished printer setfing. and the computer bytes sent?" Ioop in the flowehart is left
eight or so ASCII characters, and typing can send printer files as before. via the "yes" exit, end the circuit forms a
them into the computer wh ilst observing When 52 is pressed, data buffer rcs straight connection between the computer
the correct order. brackets and delimiters. blocks the datastream from the computer. and the printer until 52 is pressed again.
In the above example, BASIC fortu- The circuit actuates the BU5Y line to force All 16 bytes stored in the EPROM are
nately allows the printer to be set to the the computer to stop sending data. Mean- to the printer und er the control of strobe
required rnode. albeit in a rather complex while, the data outputs of the EPROM, pulses. which are started with the aid of
way prone to many errors. There are, IC7, are enabled, so that the byte at the the delayed BUSY or AIT printer signal.
however, many programs that lack even currently addressed Iocation in the The delay allows some time for the ad-
the most rudimentary means to set the EPROM is sent to the printer. Astrobe dress counter ro reach the next higher out-
pt-inter to a particular character or paper pulse is genera ted to signal to the printer put state. When a11bytes have been sent,
format. For such programs, the inifial iza- that a byte is held ready for transmission. the same delay 1S used to reset the circuit
tion atd is a useful peripheral, provided its Sinee the start of the first strobe pulse to its start canfiguration.
setting is not overrtdden by a printer in- coincides with the moment the EPROM
itialization string prefixed to each print- datalines are enabled, the strobe pulse is
able file by the program in question. delayed by about cne mieroseeond to en- 16x16 in control
Apart of the circuit drawn in Fig. 2 consist
of a set of printed-circuit board tracks
called the contral bus. This bus takes a11
Centronics control signals not used by the
initia lization aid frorn the input- to the
output connector. Two Iines, C18 and C35,
form an exception, because they may be
used to power the circuit. Whether or not
they can be used for this purpose depends
on the printer used. Diodes 02, D3 and D4
form an OR function that allows the cir-
cuit to be powered by different supplies.
In case the printer lacks a +5 V output on
its Centranics connector, the eircuit is
powered by a 9 VOC mains adapter via 02
and volta ge regulator IC9. lf the printer
supplies +5 V via line C18, the circu.it is
powered via D3. If +5 V i.savailable on Une
C3S, D4 is used for the same purpose. The
current consumption of the circuit does
not exceed SO mA.
As already discussed, the circuit 1S
reset automatically the moment the sup-
ply voltage 1S present. Bistable FF2is reset
by R9-C2, and in turn clears address
counter ICS. Bistable FFl is configured as
ELEKTOR ELECTRONICS FEBRUARY 1990
INITlALlZA TlON AID FOR PRINTERS
lITID
0 0 0 0
address range
iniUatization data
00
10
...
OF
...
1F
0 0 0 1
0 0 1 0 20 ...
2F
0 0 1 1 30 ...
3F
0 1 0 0 40 ...
4F
0 1 0 1 50 ...
5F
0 1 1 0 60 ...
6F
0 1 1 1 70 ...
7F
1 0 0 0 80 ...
8F
Swltch lC8 outputs 1 0 0 1 90 ...
9F
to aetate. BLock
ccmputer data; 1 0 1 0 AO ...
AF
enable data outputs 1 0 1 1 BO ...
BF
01 EPAOM K:7
1 1 0 0 co ... CF
1 1 0 1 00 ... OF
Putbyte at EPAOM ad- 1 1 1 0 EO ... EF
dress on datallnes; FO ... FF
start first strobe
1 1 1 1
putse (AIO/e5)
O=switch closed
1=switch open
900007· T1
r~l~,l
r~/+
E- "1·]B~~:·]3~·]
o-1r'----~'~'tc'tc'tc~6~'~.~9t_------------------------~9
A'
5V
Y>
"
DD
"
ec
..E-
o-+'L--------t-t-t-t-t-t------------------------~. A' y,
va ta
" oa"
o-1r'-----------1~C-C-t_t_------------------------~' A'
o-+''------------t-t-t-t------------------------~6 A' 'CS v. ts" D3
E
"
o-~6------------~>-C-t_t_------------------------~' A' 74HCT D4
•
"
o-+,L----------------t-t------------------------~' A6 540
Y5
ns
>; ,.
"
o-~.--------------------t_------------------------_1' A'
Y6
" -e
as
o-+9'- I~
V7
VB
" D6
~------------------------~2A8
I~
18
" "
" "
~ "
,.
ta" c"
c,,_~///-0
c"
control bus
0////////////_0////////////////////////////////-0:1-.
CIS C35
"::s: (:%: eIl
"
12
"ts C>5 2:'~~ D'~~ 05V §: 1% c" "
,--------------,
H~~6~ ~,:,1"*
c" 1N4001 ~ ~_ CI. 14
"
~ ~:: ::
ctt
" CIS);:
"ao c"
at c" , B 74HCT
'C5
QAf'~'--+-+-++-----t--~'DqAO ~:e 00 11 00 ~ cle 18
az C32_~ 03 OB 9 9 Al 01 12 01 C30 30
~i\
aa cn --' RO(I)
cc B 8 A2 02 13 02 Cl1 31
cn az
D' rs
Cl4 ~~
"
as '%
,2 RO(2) 00"
+-+++-----t--~6,A4
7A3
IC7
03
cn aa
C"
2764 D' " 04
ae C36 /';
+-+-+- +__ ~5 A5
D' " os C34
"
"ao H--+---'!' A6 D6 " ",
C" as
C36 ae
". +-----+--~' A' D' "
" r+-+-++, 25 A8
,N° , ,
,
DD
"
aa
24 A9
V
+-+---""l'
A 11}
or 31,Nl0 4 a
"
as
23 All
es
Q +-+---'12 20
A 12
ze 26 Ne OE 22
fS oa 5~116 4
~ os 13KN14 127
fS D6 lN15 28
~ V.
31~164 9
" V
1N4148 r---
L--
c~~
h..l..
r + 5V
C:t C~
STR08E
e_ 10 ~'~~~)o'-++--;~~;;t----_---'~"'l~N~S)l'l"
I1N N19,o 1
" ,' N2 ~,
6
~
N9 N14=IC3=74HCTOS
-<~N~15~.~
.. __ ~=='~Dt-o
N~2~0~:~I~C~4~:~7~4~H~C~TO~5c-
'-- ACK
ACK L.......:....
Fig. 2. Circuit diagram of the printer initialisation aid, a very useful peripheral device for advanced computer users.
Parts list
Resistors:
Rt -= SIL reststör array 8x10k
R.-R6~10k
R7 = lMO
Rs;AHJ;R11 - R15 = 2k2
R9 = lOOk
Capacitors:
C, = 10n
C2 = 4700
C3;CÖ= lnO
C, = 4n7
Cs = 470p
C7;Ca;ClO - C'3 ~ 1000
C9= 3300
Semiconductor5~
,.,01 ~ 1N4l48
02;03;0. = 1N4001
IC, = 74HCT02
IC. = 74HCT132
IC3;IC4 = 74HCT05
ICs = 74HCT93
ICö = 74HCT7 4
IC7 = 2764 or 27C64(A)
ICö = 74HCT540
IC.= 7805
Misceltaneous:
K 1 "" 36·way female Oentronics connector
with straight pins.
K2 -= 36~way male Centronics co:nnectorwith
straightplns.
S, = 4-way OIP switch block. .
S. = ITW Oataswitch push-button.
3'-Way pin header.
Jumper.
PCB Type 900007 (double-sided; through-
piated; see Readers Services page).
Fig. 4. Component mounting plan for the double-sided, through-plated circuit board.