ones who can get the most out of the
least information .
The first step is to study the
schematic to find out which lines are
outputs and which are inputs .
Obviously , lines going to th~ inputs
of I. C.'s or to transistor bases are
outputs . The ones going to the I.C.
inputs should have a healthy TTL
voltage swing; those feeding transis-
tors may not necessarily be near
+ 5V or ground ; this is because
transistors are driven by current flow
rather than voltage changes .
Lines connecting to switches may
be inputs : however. be careful. The
designer may be "scanning" the
switches with pulsed outputs and
sensing them elsewhere. If you have
a known good board , you are ahead
of the game , because you can
observe what is going on.
The CA and CB lines can be
tricky . As mentioned below , the CAl
and CBl lines are inputs used to
generate interrupts to the processor .
They are edge -triggered, like a
flip -flop ; but which edge is active is
another one of the variables under
the designer's control. When the
edge happens , the IRQ line is pulled
low until the processor unhooks it by
reading the PIA .
However . the program can
"mask" the effect of the CA and CB
lines , so do not jump to conclusions
yet - check a good board if you see
transitions on these inputs with no
IRQ output .
Also , if there is a short or very low
resistance path to + 5 on the IRQ
line , the PIA (and any other chip)
would not have the stuff to pull it
down . So check for shorts if IRQ is
stuck high . If it is stuck low , you can
have either a short, or a processor
which is too confused to clear its
interrupts .
Start by depressing the reset
switch , or grounding the processor's
reset input. This should raise the IRQ ·
if the problem is not a short (or a
dead device on the line) . If IRQ
remains stuck , disconnect the PIA
IRQ outputs from the rest of the
string and try the reset again . If this
does not cause it to come up , you
have got a bad PIA (or , you also
disconnected its pull up resistor) .
Remember, anything that is tied to
an IRQ line has to have a resistor to
+ 5, or else it will never show a high .
Figure 2 shows some typical input
and output circuits to get you started
on your detective work . The " Box"
discusses a common application of
the PIA - scanning a switch matrix .
As you can see. the 6821 has a lot of
legs . but it is basically friendly .
Reprinted with permission of Star-
Tech Journal. Merchantville , New
Jersey
•S
l
f"l~.l.
r
DO
Ol.
SecT~<»~' A.
INf'IJFPVT
DZ.
~D~
I
--.jD't
D.)
O UTPUT cONN EC.IIONS
r/J.---,
' > 0 - - - CI
P'AO
ACfiVE:- H16ti 5WITOt
fVATRIX ~TROBe
Df
~ W\1
EE ,AB5£NT-
WILL NOT f<:E}CH 15v
U/'llE5S R 1.:; U5t:D
®of
'
i
6821
f'A~
!
~
I
i
I
i
I
;_____j
Fl • 2..
RO
'Z2K
SWITCH
M!IT~.IX
RETURN
-
I
I ' h!
INPUT COtJ tJECIIONS
r--,
I;/
L
--
I
j-J_
-
Dlf'-5Wif01
TYPICAL CONtJ£CTION5>
5E:N5£