Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 22 of 28

Troubleshooting Nuclear Instruments, pages 211 to 220

Pages 211 to 220 of 273

The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

Filed in the catalog under the Camac Output register Driver CAMAC

Page 211

Chapter 10

-15-

The

In Table 10.2 are some useful hints for troubleshooting, device which is connected will be in our case a printer.

TABLE 10.2

Partial list of problems with a Centronics parallel interface Symptom

Cause/Remedy

No data is be ing printed

Check to be sure power is on. Ensure the device is in on-line mode. Check all signals according to the above specifications. Computer port driving the p r i n t e r may not be enabled; check the address of the board. Refer to PC manual. Printer lid if raised, may inhibit f u r t h e r printing. Printer ribbon may be d e f e c t i v e or worn, replace it.

Garbled data

Cable could be faulty. Timing of STROBE signal incorrect, too early or too late. Cable too long --> max. leng t h 4m. Communication line cannot be established or ma intained

For manua1. 10.5

Power may be off on the p r i n t e r .

Cable between the devices may be faulty or not properly wired.

detailed printer d e s c r i p t i o n , refer to the printer

IEC 625 (IEEE-488, GPIB) INTERFACE

The general purpose interface bus (GPIB) is a link or network by which system units communicate with each other. It is widely used for automation in measurement and control applications. The bus allows the connection of up to 15 devices to a system. Each system p a r t i c i p a n t performs at least one of three roles: CONTROLLER, TALKER, or LISTENER

A CONTROLLER manages the bus communication p r i m a r i l y by directing or commanding which device (TALKER) is to send d a t a to other devices, or to receive data from other devices (LISTENER) during an operational sequence. A controller can be interrupted and it can command devices to interact d i r e c t l y among themselves. The GPIB consists of 16 sets according to function:

lines which are grouped into three

(225)

Page 212

Chapter 10

-16-

8 lines used for data (bit parallel, byte serial, data t ransfer ) 3 lines used for control (provide a data transfer handshake c o m p a t i b i l i t y with both slow and fast devices) 5 lines used for general m a n a g e m e n t (allows initialization, i n t e r r u p t s , and special controls) All i n s t r u m e n t s are connected in parallel to the bus of such a system via s p e c i a l cables. The pin assignment be low :

and description of signals is presented

| | | |> j | |

Lines are also used to transmit commands. When ATTENTION (ATN) = 1, d a t a on the lines i n t e r p r e t e d as c o m m a n d . When ATN=0, d a t a are i n t e r p r e t e d

Pin No.

Signal

Description

1 2 3 4 13 14 15

DIO 1 DIO 2 DIO 3 DIO 4 DIO 5 DIO 6 DIO 7

Data bit 1 (lowest) Data bit 2 Data bit 3 Data bit 4 Data bit 5 Data bit 6 Data bit 7

16

DIO 8

Data bit 8 (highest) _|

17

REN

Remote Enable: will be a c t i v a t e d when system is act ive

5

EOI

End or I d e n t i f y : E O I = 1 , ATN=0 -> last b y t e of a datablock E O I = 1 , A T N = 1 -> parallel poll

9

IFC

I n t e r f a c e Clear:

Resets the whole system

10

SRQ

Service R e q u e s t :

has same p r i o r i t y for all instruments in a system. Is active whenever an instrument r e q u e s t s a service. Controller will interrupt and s t a r t with a serial poll to d e t e r mine and satisfy the requestor.

11

ATN

Attention:

ATN = 0 Data is t r a n s m i t t e d ATN

= 1 Commands t r a n s m i t t e d

6

DAV

Data V a l i d :

7

NRFD

Not Ready For Data:

(226)

as d a t a .

i n d i c a t e s the data on the bus is valid is sent from the instruments to indicate that they are not ready to accept data

Page 213

Chapter 10

-17-

No Data Accepted

NDAC is sent from the instruments that valid data on the databus have not been overtaken yet .

SHIELD

12

GND

18-23 24

LOGIC GND

DID 1 ... 8 rJor

DAV

6OME

[i!T~

NRFD

'ReftD/

«t l ffi'i

1i ! i 1 SOME f 1 1 11 i t 1 t 1 1 1 l

NDAC

Fig.

,* i i TOOK- T>rtr* OLfER l i i MO r*/-sfc^

?> t i i i i, > * i OOh

!f

10.7: Timing diagram for handshake

As an example, we will take the Canberra count er/1imer 2071 with the installed GPIB-option (see Fig. 10.8). Before you can operate the sealer in a GPIB system, you have to configure the interface through eight DIP-switches . The first five switches from the top are used to set the units' GPIB address. The address is the sum of all switches in the ON position. DON'T select an address already used in your system. Also, address 31 is illegal; it is reserved for the GPIB command UNTALK. The sixth switch is TALK ONLY.

At this point you have to decide whether your sealer works with or without a controller. The TALK ONLY mode is used to transfer data from a single module to a single peripheral listener device, such as a GPIB-prin t er. If the TALK ONLY switch is o f f , the controller must assert REN (REMOTE ENABLE) during the entire communieat ion.

The seventh switch is RECYCLE. In the ON position, the unit In the OFF will clear after readout and start counting again. position, the unit is in the single cycle mode.

(227)

Page 214

C h a p t e r 10

-18-

The e i g h t h switch is FF/CR. In the FF position, the message unit d e l i m i t e r is sent out as an ASCII Form Feed. In the CR position, it is sent out as a Carriage R e t u r n . The choice of the d e l i m i t e r d e p e n d s upon the p e r i p h e r a l device b e i n g used. Let us controller :

take a closer look at the interaction with a

A t y p i c a l c o u n t i n g sequence would begin w i t h the operator pressing s t a r t on the Counter. A f t e r reaching p r e s e t , the Counter will g e n e r a t e a SRQ (Service R e q u e s t ) via ECOL (END COLLECT) from count er/1imer. The controller would t h e n , via Serial Poll, determine the device requiring readout. During this polling s e q u e n c e , the c o n t r o l l e r will assign each of the devices to be polled a Talk a d d r e s s , and t h e n the device will put out a STATUS-byte.

In our c a s e , the

Counter is the r e q u e s t e r and would o u t p u t the S t a t u s 42H and remove its service r e q u e s t . not have b e e n the r e q u e s t i n g device,

If it would it would o u t p u t a S t a t u s 00.

The controller c o m p l e t e s the s e r i a l poll mode by doing a Serial Poll D i s a b l e (SPD). If the C o u n t e r is the only possible source of the Service R e q u e s t , the c o n t r o l l e r can respond immediately by r e a d i n g the d a t a from the m o d u l e , which also clears its Service R e q u e s t . To read d a t a from the C o u n t e r , the c o n t r o l l e r r e s p o n d s to the S e r v i c e R e q u e s t t h r o u g h the Ready For Data (RFD) line via the Acceptor Handshake.

Read Clock E n a b l e (RCE)

is a c t i v e once MY TALK

A D D R E S S and Read Clock (RCL) is sent to the c o u n t e r to clock the bytes from the c o u n t e r s during S3 (output sequencer). After each LSB (Least S i g n i f i c a n t Byte), the o u t p u t s e q u e n c e r a c t i v a t e s SA to gate the message unit d e l i m i t e r to the bus (separates counter o u t p u t s ) . A f t e r S4 of last counter S5 became a c t i v e and gates ASCII Line Feed and EOI to the bus (End Message). A f t e r w a r d s LB (Last B y t e ) is a c t i v e and t e r m i n a t e s the TALK MODE.

Following you w i l l find a Block Diagram (Fig. 10.8), a Circuit D i a g r a m (Fig. 10.9) and a d e s c r i p t i o n of the signals (Table 10.3). Troubleshooting in such a system is l i m i t e d because of its c o m p l e x i t y . F i r s t , in many i n t e r f a c e s you will find large scale i n t e g r a t e d c i r c u i t s w h i c h s u p p o r t you with all signals used for the GPIB. Most of t h e m are set up and p r o g r a m m e d via software. Second, without a logic analyzer, you are in great difficulty. Timing r e l a t i o n s among the signals are essential, and they can only be a n a l y z e d by using such an i n s t r u m e n t .

So w h a t to do if your GPIB system doesn't work, and you have a logic analyzer? Let's go s t e p by step: 1.

Look to see if power c o n n e c t e d to the GPIB.

2.

Check if the interface cables are p l u g g e d in c o r r e c t l y .

3.

Check the addresses to which each device in the system is s e t ; d o n ' t use the addresses twice.

(228)

is applied to in all good of don't your devices condition and

Page 215

CONNECTOR TO S C f l L E R / T l n E Pî

CLOCK

^-j^

GENERATOR

CLp<

HS/B7, - - - - ,

-12V

20

+12V

19

GND

18

RMTRS

17

CND

16

RCL

15

STP

14

ST

5

Q pn

13 i

IP

BCD 2

11

D r* n u t ci p pp o

Q / Q

•-

RESET

*u!

CIRCUIT

<IFC

R1B/R21/

" SET HBRT flE3

+-<Q

- -

ABRT

S3 "C

*-<j| s,

RCYL

MV TALK ADDRESS LATCH A8/AZ3/AZ3/AZS/AZT/AZ« q Q

ENflBLE

7

(CD

C

ECOL

5 pr c u

ECOL

3

+ 5V

2

+ 5V

1, - TON * - £^VdÜÜÜ P, - - - - OUTPUT D A T A SEQUENCER, - - - - - - - - *•, - R8/All/A18/A2a/AZ7

GPIB

CONNECTOR n

•y ta •O

(T

Fig. N>

VD

1 0 . 8 : Block d i a g r a m of counter 2071

GPIB interface for

Canberra

(5

Page 216 read from a scan by OCR; it may hold reading errors

(0€Z)

“Teor Per, - jA4d Fede + _ ‘ x 1 ¢ ty t+ a Ty anes am aM ~~ : ay fantee sy I ~ ; el Dae e BELAPT : an 4 ( ri Lage: oouned ~ us) ~~ * GAB Commaton, GAS © Comnectaa_It Sirste : = Ei TRancavets n “7 1 fe] “ky to “ Ly c pt isee, 1 mor & earn (=) avery aie OH c aan ak new owe 18 me we [y rt} mae wares tr ” re re a ar mM Jeu A ae 8 aes ares, ram ” yaw * i so) om 4? Attu = G mo : 2 $ - 1/s} Owe “a Lend our 8 by. . £052 av er sa) ps8e q ee Pr) ee cy Sue pe ~ i} ey) ibe sw ar Al} aor fe} a 1 ue : a} tee 2 “s ao} wesc |__| ch” avo ba ave pat ‘ , Mit en te Oe Fy FOr i] Te 4| oes No, _ T| ows oO a} O1oe t ev 4} ator 1s y iH (ZA? g aca ALE a aa bl ‘ er) tof tL at Reset Ci@cut v [yom 3 | 4 on rn re | amas , MY ADOR ESS peCopeR ’ Neus c ‘ coro hier B25 a 4 | {ee, 1], - ik At) ee . 5. *, Fig. 10.9: Circuit diagram of GPIB inter- facing for Canberra counter 20/71

Page 217

-21-

TABLE 10.3:

Chapter 10

GPIB option functional description

The following twelve functions, i d e n t i f i a b l e on the GPIB interface s c h e m a t i c , are described in terms of the function inputs and o u t p u t s with brief d e s c r i p t i o n s of the o u t p u t functions. Oumuti

CK

SAG'

CLOCK

«SFT

RESET

OAV

OATA VA1O

BUS GENERATED

ATM Ompu«

ATTENTION

BUS GENERATED

READY FOR DATA

ACTIVE WHEN READY TO RECEIVE THE NEXT BYTE FROM THE BUS ACTIVE AFTER DECODED BYTE HAS BEEN ACCEPTED BY THE MODULE ACTIVE FOR ONE CLOCK PERIOD DUB KG STABLE AND VALID DATA STROBES ALL MODULE DECODERS AND LATCHES

«re

OAC

FROM RESET LOGIC

SERIAL POIL RESTONS*

RSFT

CLOCK

T£

RESET DATA ACCEPT READY FOR DATA TALK ENABLE

TED

TALK ENABLE

S3

«LAV STATE}

OAC

RFO

FROM NTERNAL CLOCK FROM RESET LOGIC BUS GENERATED BUS GENERATED FROM TALK DELAY GENERATOR FROM TALK DELAY GENERATOR

B>TE CLOCK

•I Output DfjU Sequencer end Geimg inputs TALK ENABLE TAKE IT SERIAL POLL

TAKE IT

ROY

SERIAL POLL MODE FROM SERIAL POLL MODE LATCH BYTE CLOCK FROM SOURCE HANDSHAKE THING READY FROM SOURCE HANDSHAKE TMING

RCYl

RECYCLE

CR/FF

ASCII OS OH FF

LEAST SKXIF CANT BYTE CTR AendBnol

FROM OUTPUT DATA SEQUENCER GENERATED TO SYNCHRONIZE NTERNAL CBOJITS ON EACH OUTPUT BYTE NACTIVE DURNG THE PER CO WHEN STATE AND BYTE CHANGES ARE OCCUR

DIGITS

BCD«

RING GOES NACTn/1 ON DAC ACTIVE

BCD« Output!

ON THE RbNG EDGE Of NEXT CK AFTER

S3

READ CLOCK

GENERATES DATA VALID TO THE BUS

ACTIVE NOCATED BYTE RECEIVED ON THE BUS GENERATED BY DAC AND

ATN MTA Outputs 16

TED aocK

TERMNATE TALK MODE

CHANGES TO NEXT L SB ON THE FALLING

END OR

EDGEOFRC1

IDENTIFY RESTARTS

TALK ENABLE

ACTIVE FOR TALK STATE SYNCHRONIZES BUS TO NTERNAL tnput»

FROM MY TALK ADDRESS LATCH

CLOCK FOR CORRECT TWMG

MY ADDRESS

BYC

BYTE CLOCK

FROM MY ADDRESS DECODER BUS GENERATED |10| FROM ACCEPTOR HANDSHAKE TMNC

HVIT

HAVE IT

FKOM SOURCE HANDSHAKE T MMG FROM SOURCE HANDSHAKE TMIMG

IB

LAST BYTE

ABRT TON

ABORT

ECO.

ENDOFOOUECT

OVAL

Output!

DATA; «

TALK ONLY MOOt

FROM OUTPUT DATA SEQUENCER FROM RESET CIRCUIT SKHJ FROM COUNTER BOARD

BCE

READ CLOCK

OUTPUT TO COUNTER BOARD

MTA

ENABLE MY TALK ADDRESS

TO ENABLE RCL ACTIVE AFTER BUS COMMAND MTA MACTIVE AFTER DTA OH UNT BUS COMMANDS CLEARED ON LB AND HVfT il M, Auixn» Dtcaarr tnputi Dl D5 SX) 1

DATA 1 5 ADDRESS

SX i SWITCHES

DATA VALID

FROM ACCEPTOR HANDSHAKE TMrgG

REM

REMOTE

Dl 07 Oulpull

DATA I 7

FROM REMOTE LATCH BUS GENERATED

BUS ADDRESS SELECT SWITCHES

I to It

NOTE AII«»«ctiM on ttmvmi

DEVICE CLEAR

CK

CLOCK

RSET MA

RESET MY ADDRESS

DVAL

DATA VALIO

D6. D7 DATA I 7 Output! REM REMOTE

MY ADDRESS

FROM NTERNAL CLOCK FROM RESET CIRCUIT

FROM MY ADDRESS DECODER FROM ACCEPTOR HANDSHAKE T WING

BUS GENERATED 07 O6

[10OR01]

ACTIVE AFTER HAVING RECEIVED MY LISTEN OR MY TALK ADDRESS FROM THE BUS NACTIVE AFTER RSET it) RnetCmxl Input! POWER ON NTERFAOE CLEAR TALK ONLY REMOTE ENABLE

ACTIVE AT POWER ON

BUS GENERATED mOMSJO-6

BUS GENERA TED

Outputl

ABRT

ABORT

RSET

RESET

31}«

Output!

MA

WHEN ENABLED SENDS A STOP PW SC 'O THC COUNTER ON A OCL COMMAND FROM THE BUS 07 01 10010100] toi fiairiule Leicri Input» fCi TON REN

BUS GENE RATED BNARY WEIGHTED

DVAL

DO.

DATA VALID

O7 M

(ENDMESSAGEl

IS SELECTED BUS GENERATED

M» T«» A«KMMLAlcri mpuu MA

DRIVES BUS COMMAND LNE EOl PULSE SENT TO THE COUNTER BOARD DURNG STATE 5 If RECYCLE

FROM NTERNAL CLOCK

ATTENTION MY TALK ADDRESS

TALK ENABLE DELAY (Alj 2i

SENT MOST SIGNIFICANT DIGIT FIRST

OUTPUT GATES ASCII L»JE FEED AND EOl TO THE BUS IEND MESSAGE I ACTIVE AT THE END Of OUTPUT TO

SENT TO COUNTER TO CLOCK TK BYTES

31 Te* Orb* Generator

CK

DURING DATA OUTPUT CONTAIN THE COUNT DATA SYNOOONIZED TO B»C

ACTIVE AFTER S« Of LAST COUNTfO

FROM THE COUNTERS IN S3 DATA

Inputi

ACTIVE OURNG AN LSB FROM THE COUNT ER BOARD ACTIVE HIGH WHEN THE FIRST COUNTER S BENG SENT AND LOW FOR OTHtN COUNTERS CHANGES ON THE F ALL ING

ACTIVE FOR ALL STATES E»CEP1 SPM S* OR Si GATES BCD DATA WITH ASCII HEADER 13« HEJI) If HOY AND TE TO THE BUS ACTIVE AFTER LSB TO GATE MESSAGE UNIT DELMITER TO THE BUS (SEPARATES COUNTER OUTPUTS!

VAL O TO THE END OF BYC FORCED BY TE, TED OH ROY TO PREVENT BYC RCl

SELECTS EITHER CARRIAGE RETURN OR FORM FEED AS A MESSAGE UNIT

FROM THE COUNTER BOARD

CODED

IALLOWNG DATA TO SETTLEI AND RFD NACTIVE AFTER OAC HAVE IT

RECYCLE MODE SELECTED SJO 7

EDOEOFLSB

BCD'

BCD:

GOES ACTIVE AFTER A DELAY TMC HV1T

FROM TALK DELAY GENERATOR FROM SOURCE HANDSHAKE T MMG FROM SERVICE REQUEST LOGC

RESPONSE

BYC GOES INACTIVE TKIT

SRO TO GATE SERIAL POLL

DEL MITER SJO*

Outputi BYC

ACT WE AFTER ECC UNTIL TL N REMOTE ONLY ACTIVE IF SPM WOB TO TE AND

RESPONSE TO THE BUS

7l Source rtendehefce trrMng

CK

SERVICE REQUEST fROM NTERNAL CLOCK

ACT IVE AT POWER ON OR DURNG If C CLEARS MY TALK ADDRESS AND SERIAL POL L MODE LATCHES ACTIVE AT POWER ON OR DuHiNG HEN RESETSALL HANDSHAKE CIRCuiTSAfrfJ

THE REMOTE LATCH if TON SELECTED

ACTIVE FOR 101'D5 I- ISXMTOS20SI

MONITORS REN TO PREVENT BUS CON FLCT WITH AN ACTIVE CONTROLLER

61 &••«•< POM Mod» L»lef mputi

O< 0?'

DVAL ABHT Oulpull SPM

1?) lote<n»l Oort

DATA 1 7

BUS GENERATED

DATA VALID ABORT

FROM ACCEPTOR HANDSHAKE TMING FROM HtaCT CIRCUIT

SERIAL XXL MODE

ACTIVE AFTER SPE COMMAND

FROM THE BUS D7 07

THE CLOCK CIRCUIT GENERATES THE TMNG FOR PROPER OPERATION C* NTERNAL AND EXTERNAL CIRCUIT REQUIREMENTS Pol«*« Inter»«, GREATER THAN 3 *MC t Interval - GREATER THAN I uiec

001100 AND Dl

01 NACTIVE AFTER SPD COMMAND- 07

CO

OOliaOANDDl 0

7) S*<y«c Rcovjnt Log« MpuB

REM SPM

REMOTE SERIAL POLI

FROM REMOTE LATCH

FROM SERIAL POLL MODE LATCH

MODE TE

TALK ENABLE

ECOL

END Of COLLECT

FROM TALK DELAY GENERATOR FROM COUNTER BOAF<0 FOR ANY STOP COLLECT

(231)

Page 218

Chapter 10

-22-

4.

If e v e r y t h i n g was correct, disconnect all devices and try with a single one.

it

5.

If you don't have success, try another cable, another unit.

6.

If after all these tests your controller still does not work, open it and check if the board is installed properly.

7.

Measure the supply voltage of the board.

8.

Take an oscilloscope and check the signals (TTL-level).

9.

If no signals after the GPIB-transceivers a p p e a r , check if signals appear before the transceivers - if n o t , your controller is faulty.

For further diagnostic tips, see Table 10.4.

TABLE 10.4:

List of problems t y p i c a l for a GPIB interface

Symp t om

Cause/Remedy

Device receives wrong commands, transmits wrong results or status information, cannot be addressed.

One or more d a t a l i n e s , NRFD, NDAC i n t e r r u p t e d

Controller doesn't receive Service Request Continuously receives Service R e q u e s t Device cannot be programmed Device cannot receive commands No remote control No parallel poll possible Cancels receiving after first received data block Bus blocked

SRQ SRQ ATN ATN REN EOI EOI

10.6 or tied too low (bad bus transceiver) interrupted tied too low interrupted tied too low interrupted interrupted tied too low

DAV interrupted

I/O PORTS

Most microcomputers incorporate some form of parallel input/output (PIO) facility. While an increasing number of microprocessors provide this as a built-in f a c i l i t y , parallel I/O invariably takes the form of one, or more, LSI devices known as a peripheral interface adaptor (PIA). Such devices generally provide separate 8-bit ports, in which 8-bit lines can be configured, under software control, as input or o u t p u t . The interface from the PIA to the CPU usually consists of eight data lines, two or more address_1 ines, and difjE_e_rent control lines like Chip Select (CS),Read (RD), and Write (WR). The data lines are. of course, bidirectional whereas the address and control

(232)

Page 219

Chapter 10

-23- lines are unidirectional and form a subset of the system. The PIA thus appears as a number of specific memory or I/O addresses which may be selected by appropriate software instruction^. The_PIA also utilizes the CPU control bus when, for example, a RD and WR signal is used to determine the direction of the data flow from/to the PIA. In a d d i t i o n , bidirectional buffers are used to interface the peripheral lines to the PIA. These buffers are generally TTL-compatible and provide limited current drive capability, typically in the order of 1mA. As a typical example for a PIA we will take the 8255, which is see also called programmable peripheral interface (PPI) Fig. 10.10. PA3C 1PA2C PAlC

PAO: ÏÏ5C C5C ovC A1C AOC

PC7C PC6C

PC5C PC4C

PCOC

PC1H PC2C PC3C PBOC PB1C PB2C 20

Fig. 10.10:

^

40 I]PA4 D PAS DPA6 3PA7 3WR

3 RESET

Doo DD1 U D2 D 03 DD4

DOS Doe

D 07 3 »5V DPB7 DPB6

DPBS 3PB4

21 DPB3

Pin-out of 8255 programmable peripheral interface

As an example of the use of PIA devices, we will consider the operation of a keyboard decoding arrangement, see Fig. 10.11. On most computers, the keyboard consists of a matrix of 60 or more switches, with the possible addition of further switches reserved for specific functions. The key matrix is arranged in eight columns and sixteen rows. Ports A and B are configured as inputs while port C is configured as an o u t p u t . Note that only half of port C is utilized and that the four output lines are taken to a four-to-sixteen line decoder. This device effectively scans the keyboard rows, addressing each in turn as the binary count on port C is cycled through its sixteen states under software control. This process is repeated every 10ms and an appropriate interrupt is generated when a key is pressed. This interrupt is done by a return signal appearing on a column line. Note that special function keys, such as "SHIFT" and "CONTROL" do not form part of the matrix. These higher priority keys are treated separately as direct inputs to port A.

(233)

Page 220

C h a p t e r 10

-24- n n n ° - ^"^^ * !hi|< ^yi == = r i -^ ^ in xi_ .______ : - . F -*-ov

0

• - T - -p - - °""° - = - i

PA3 PA2

PA; PAO 07-

06050403020100-

PB 7 PB6 PBS

07

06 05 04 03 02 01 DO

I I ! . S V Functi n 1 I1 i - - - - o o - - - - - - - - *

-5V

3k 3 « a, 0-, <h P92, <h PB 1, <h 8255 PB4

P83

PBO

RÊSËT-

AlAO-

RESET ÇS PC3 PC2 PCI PCO

Al AO

16 * 8 keyboard matrix

220n

HH «5V0V-

YO

Y15 74159 decoder DC 9 A

EN

• ov

Fig. 10.11:

K e y b o a r d coding arrangement using a 8255 PPI

Now let us assume t h a t there is something wrong with your keyboard i n t e r f a c e ; how do you start t r o u b l e s h o o t i n g . First, try to find out if only one of a group of keys is not working or if the whole k e y b o a r d is not working. This may be seen by pressing related keys in the keyboard. If your whole k e y b o a r d is not working, check the supply voltage. Take an oscilloscope and have a look if scan pulses appear on PCO to PC3. If they do, look at the d e c o d e r o u t p u t to see if this is working. Pulses should appear on lines 0 to 15. Next check if the pulses are c o n n e c t e d t h r o u g h to the i n v e r t e r s and PBO to PB7 by pressing the r e l a t e d keys. Check the special function keys at PAO to PA3. If you find that up to now e v e r y t h i n g works correctly, you can assume t h a t your controller is d e f e c t i v e . But before changing it, make some more tests on the bus side of the controller.

If you find t h a t on the p e r i p h e r a l device the keyboard works properly and that writing to the PIA is correct, then there may be something wrong with the read control line. If RD appears as w e l l , we may think in two a l t e r n a t i v e s : first the PIA is b a d , second it was wrongly initialized so that the ports are not set p r o p e r l y . M a y b e your software is causing the trouble. So w r i t e a

(234)