9·2 Control procedure
(1) Check
if
the
printer
is
busy.
(2)
Output printed data
to
port
A
of
8255.
(3) Reset the PC5 bit (STROBE).
(4~
Set the
PC5
bit (STROBE).
(5) Set the
PC6
bit
(I
NTE
flag)
to
enable interrupts.
(6)
Wait
for an interrupt (lNT) .
.
J7)
Reset the
PC3
bit (I NTl.of
the
8255.
(8)
Output the next printed data
to
port
A.
(9)
Reset the
PC5
bit (STROBE).
(10) Set the PC5 bit (STROBE).
(11)
If
the printed data
is
the
last piece
of
data, reset
the
PCS
bit (lNTE)
to
disable
the
interrupt.
(12)
If
it
is
not
the last piece
of
data, wait for an interrupt.
i
\"
9-3
Parallel interface signals
Pin
No.
Signal name
Direction
Table 25
Description
1 STROBE
-PRINTER
Printer samples
print
data
at
the leading
edge
of
this signal.
2
DATAl
3
DATA2
4
DATA3
5
DATA4
-+
PRINTER
6
DATA5
7
DATA6
8
DATA7
9
DATA8
10
ACK
+-
PRINTER
11
BUSY
+-PRINTER
12
PE
+-PRINTER
24
SRES
-
PRINTER
25
SELECT
+-
PRINTER
*
14--23
GND
* 13
t 9·4 Timing
chart
BUSY
L,\
__
L
___
--I
(PB~)------l
~
.-
(~)-------
IrP%rf-----~-+'__;_-..J--.,
DATA
(pMl-T)
"
Print
data
!
I
Character
input
complete
or
function
complete.
Data receive ready:
Low
Paper end:
High
Reset signal
Indicates the selected state (receive ready):
High
L~
.
.1.I
__
_
~-~-.,
r+---------~~
r-------
(PC5)
Fig.
49
-45-