Sunteți pe pagina 1din 6

IC tester

Part 2: menu structure


and test-vector building
Last month we gave
you the low-down on 1 IC Tester
1:Test
Normal keyboard functions:

up/dn = scroll up/down


the hardware aspects ent = accept next menu
esc = return to main menu

of this powerful and Select Library up/dn


ent
74 x x x
versatile IC tester. In esc

this second and con- Figure 1. Structure of


Menu option 1: Test.
cluding instalment, Select IC:
74 : 00
up/dn
ent
esc
we turn to program-
ming matters. Insert IC,
Press Enter ent
esc

Testing, don't
To be able to apply the information remove IC !
D6 lights
presented in this instalment, you have
to have a working IC tester available,
together with all the files found on the
OKAY not OKAY
diskette with order number 986014-1 or
CD-ROM 986001-1 (see further on).
The tester is very likely to function
ICCL : x mA Test failed:
properly if the message
ICCH : x mA Ent: rep Esc: exit
IC Tester ent = repeat test
1:Test esc
any key

appears on the LCD when you switch


the power on. However, this project
features a number of clever hardware Test ok
ent = repeat test
checking options. Although you may Ent: rep Esc: exit esc
980029 - 2 - 11
not need to do any hardware checking
at all, the relevant routines are briefly
mentioned further on. For now, it is
assumed that the tester works properly. the functions of the (few) keys on the more advanced users among you who
keyboard. Fortunately, the use of these require a deeper knowledge of the
MENU STRUCTURE keys is consistent in most menus. To way the instrument uses built-in soft-
As already mentioned in last months help you stay oriented, the structure ware to test logic integrated circuits.
instalment, you are looking at a test of each of the major sub-menus For a good understanding of the hard-
instrument which offers three commu- offered by the tester is shown in ware/software interaction, it is neces-
nication channels with the real world: Figures 1 through 8. Where a key has sary to analyse the structure of the file
a keyboard, an LCD and a serial com- a non-standard function, this is indi- Test Vector File which is permanently
puter interface. Throughout the oper- cated separately. stored in the system EPROM, together
ation of the IC tester, menus are used to Many of you will be perfectly with the program executed by the
interact with you, the user. Selecting happy to use the 1:Test menu most of microcontroller.
from the plethora of functions offered the time, or the 3:Retest menu if you A copy of the test vector file which
by the instrument is basically very sim- are looking at a pile of identical ICs is compiled, converted to binary and
ple and easy to learn once you know which should be subjected to a then stored in the default system
go/non-go test. EPROM (order code 986507-1) may be
found on the project diskette, order
TEST VECTOR FILE code 986014-1, as well as on the P-C
Design by L. Lamesch From here on, we are addressing the Hard & Software 97-98 CD-ROM, order

Elektor Electronics 4/98


46
Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

code 986001-1 (look in the subdirectory


IC Tester Normal keyboard functions:
/INT/BIN). The file is called VECT.TVC, and 2 2:Identify
contains all information the system up/dn = scroll up/down
needs to check the massive amount of ent = accept next menu
esc = return to main menu
ICs listed in Table 1 in last months
instalment. For now, lets load Select Pincount: up/dn
ent
VECT.TVC into a word processor, and 14 esc
examine the syntax used. What do all
these keywords mean?
Select VCC Pin: up/dn
; Unknown ent
esc
Comment delimiter. All characters fol-
lowing the semicolon are treated as
comment, and ignored by the system. up/dn Figure 2. Structure of
Select GND Pin:
Unknown
ent Menu option 2: Identify.
esc
LIBRARY lib_name
Defines the start of an IC library. This
should be the first keyword in the .TVC
file (except comment, of course). All IC Mark Libraries: up/dn
ent
types which follow this keyword 74 x x x esc
belong to the library with the name
lib_name. The name of the library
may consist of up to 15 characters. press dn to scroll press dn to scroll
to last but one entry to last entry
There is no limit to the number of
libraries in a .TVC file.
Mark Libraries: Mark Libraries: up/dn
NAME ic_name ent
Cancel Accept esc
Defines the start of IC data, and
launches the test vector set for the IC up/dn
ent = return to main menu
with the name ic_name (max. length esc
is 15 characters). There is no limit to Insert IC
the number of ICs in a library. The end Press Enter
of the test vector set is marked by the
next occurrence of NAME, LIBRARY, or
dn = show child ICs (if available),
the end of the .TVC file. else library of IC found 74 x x x during
ent = continue scanning scan
74 : 00
esc = return to main menu
CHILD parent_ic_name
If an IC employs the same test vectors
as one already defined, it is sufficient
to identify it as a child of a parent. IC found no IC found

For example, the 74:132 has the same


function and pinout as the 74:00,
except that the gates are of the Schmitt IC found, Parent: No IC found
trigger type (which is not recognised 74 : 00 Press Enter
by the tester). A 74:132 is defined as ent = return to main menu
follows:
has 'child' ICs
NAME 74:132 ;define new IC
CHILD 74:00 ;declare as 74:00 up = show previous child IC (if available),
else parent IC
offspring Child ICs: dn = show next child IC (if available),
74 : 24 else library of IC found
ent = continue scanning
A parent may have up to 100 children. esc = return to main menu

up = show previous child IC (if available),


PINS pin_count Library: else parent IC
dn = show ent/esc option
Unless a certain IC is a child, its test 74 x x x ent = continue scanning
vectors have to be defined. In that esc = return to main menu
case, the first keyword to use is always
PINS which defines the number of up = show library of IC found
Ent: Continue
pins on the IC. ent = continue scanning
Esc: Exit esc = return to main menu

PINORDER pin_order
Library of IC found is shown 980029 - 2 - 12
Links the individual IC pins to the
columns that supply the test vectors.
PINORDER may only follow PINS, and
the pins are identified using their pin This defines the function of each indi- separated by spaces (not obligatory,
numbers. Individual pin numbers vidual pin. The following functions are though), and all pins must be included
should be separated by a space char- available: in pin_definition. Pins which should
acter. All IC pins have to be identified O output not be tested are defined as outputs
in pin_order , including pins which I input (O), and not tested in the VECT line
are not tested. G ground pin (X). PINDEF should precede the first
V Vcc (+supply) pin VECT. After a VECT line, the pin func-
PINDEF pin_definition The individual pin functions may be tions may be redefined using PINDEF.

Elektor Electronics 4/98 47


vector. Likewise, VCC should be
IC Tester Normal keyboard functions:
3 3:Retest
matched with a 1.
up/dn = scroll up/down
ent = accept next menu count, ENDR
REPEAT
esc = return to main menu
This keyword allows a loop to be
74 x x x implemented, containing test vectors
74 : 00 (VECT) and pin function definitions
(PINDEF). The loop is repeated count
times. Each loop has to be
any key Figure 3. Structure of terminated with an ENDR
Menu option 3: Retest IC. keyword. Nested loops
are not allowed.
Insert IC, ent
Press Enter esc PULL on_off
This keyword tells the IC tester hard-
ware to connect the IC outputs to pull-
insert IC in socket down resistors during the test (on_off
= 1) or not (on_off = 0). When on_off
is at 0, the outputs are continuously
Testing, don't loaded by a pull-up resistor, and test-
remove IC ! ing for a high-Z state is not possible.

ICCL
When this instruction is encountered,
test OKAY test not OKAY the regulated power supply measures
the IC supply current. After the test,
the supply current is indicated as
Test ok Test failed! ICCL. ICCL may only be used once for
Ent: rep Esc: exit Ent: rep Esc: exit any one IC.
ent = repeat test ent = repeat test
esc esc ICCH
980029 - 2 - 13
When this instruction is encountered,
the regulated power supply measures
VECT test_vector Z test if pin is at high impedance. the IC supply current. After the test,
A test vector may consist of the fol- X do not test this pin. the supply current is indicated as
lowing elements: ICCH. ICCH may only be used once for
1 output pin: check if pin is at 1; The individual elements may be sep- any one IC.
input pin: apply 1 to pin. arated by spaces (not obligatory). If a
0 output pin: check if pin is at 0; pin is defined as GND, it should have The following points should be noted
input pin: apply 0 to pin. a 0 at the relevant position in the test when writing your own test vectors
for ICs not included in the default
library.
IC Tester Normal keyboard functions:
4 4:Trace
w All IC inputs have to be made logic 0
up/dn = scroll up/down and logic 1 at least once, in a manner
ent = accept next menu
esc = return to main menu that ensures that this change can be
detected on at least one IC output.
Select Library up/dn
ent
w All IC outputs have to go 0 and 1 at
74 x x x esc least once during the test, and also Z
(high-impedance or tri-state) when an
output can assume this state.
Select IC: up/dn w With ICs having a sequential internal
ent
74 : 00 esc circuit, IC inputs driving the clock
input of a register flip-flop may not
change state in unison with inputs of
Insert IC:
these flip-flops, if this transition equals
Press Enter
ent the active edge of the clock input. For
esc
example, the clock input of a 74:74
may not change from 0 to 1 when the
pin 1 = lower left-hand position level at the data input changes at the
pin 14 = upper left-hand position ent, up/dn = next test vector
V = Vcc pin V11 0011 00 esc same time. This proviso also applies to
G = GND pin 01 1111 00G dn = skip repeat loop (if used)
clock and enable inputs of synchro-
0 = IC input at 0
1 = IC input at 1 nous counters.
Z = IC output at high-Z (3-state)
0
0
0 = IC output at 0, should be 0 D6 lights w If an enable input of a latching flip-
1 = IC output at 1, should be 0
0
Z = IC output at Z, should be 0
flop toggles, the level at
1
1
0 = IC output at 0, should be 1
Figure 4. Structure of the data input of the flip-
1 = IC output at 1, should be 1 measure ICCH, ICCL,
1
Z = IC output at Z, should be 1 end of test Menu option 4: Trace. flop is not allowed to tog-
ERR = error in output state
gle at the same time. This
applies to rising as well as
Ent: Restart ent = repeat test falling pulse edges.
Esc: Exit esc
980029 - 2 - 14 To close off this section, Figure 9 shows

48 Elektor Electronics 4/98


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

an example of a set of test vectors writ-


ten for the type 4040 CMOS 12-stage rip- 5 IC Tester Normal keyboard functions:
ple-carry binary counter. Although not 5:Options
up/dn = scroll up/down
all compiler keywords are used, the ent = accept next menu
example is still useful to unravel the esc = return to main menu
structure of the vectors in relation to
Mark Options: up/dn
the internal operation of the IC. A Disp ICC
ent = mark /unmark Figure 5. Structure of
esc
pinout diagram is included for your Menu option 5: Options.
convenience. Note how the repeat
Options:
instruction is used to toggle the logic
Disp ICC: show ICCL or ICCH after IC test
level at the clock pulse input (cp). Ident: show all IC types during scanning
Depending on the number of clock Retain Selectn: selected ICs, libraries, pin count,
Vcc/GND pin positions, are always retained.
pulses applied in this way, a particular
IC output (Qx) should go high. The
hardware monitors this output, and its press dn to press dn to
last entry last but one entry
level is compared with that stated by
the test vector. For example, a logic 1
should occur on output Q8 of the 4040 Mark Options: Mark Options:
after 128 clock pulses. If this logic one Accept Cancel
is not measured after the endr
instruction, in other words, if the up/dn up/dn
ent ent = return to main menu
response of the IC under test does not esc esc = return to main menu
match the test vector after endr, the 980029 - 2 - 15

IC is identified as faulty, and may be


binned! Comment is also used in this
test vector script: the fourth line con-
tains the logic labels of the IC pins. 6 IC Tester Figure 6. Structure of
Note that some manufacturers of the 6:Info Menu option 6: Info.
4040 start with output label Q1 rather
than Q0 as indicated by the comment.
This does not affect the operation of
the IC, however. IC Tester 1.0 (C) any key main menu
L. Lamesch 1997
More IC test vector scripts and inter-
980029 - 2 - 16
nal diagrams are given on this months
Datasheets.

TEST VECTOR EPROM. File appending, by the way, is ICTVC VECT.TVC.


COMPILING AND achieved with the aid of the DOS com-
DEBUGGING mand copy ict.bin+vect.out It generates the following files:
The purpose of analysing the master /b eprom.bin.
test-vector file as we just did is to The compiler is invoked by typing TVC.OUT: test vector file (binary);
enable you to write your own test ERR.OUT: error report;
scripts for ICs not included in the ICTVC [source file.TVC] LIST.OUT: list-file containing informa-
default library (see Table 1 in part 1). tion on the source file, binary file, a
In principle, you only need a datasheet For example, copy of the source file with line num-
of the IC to reason how it should work.
Eventually, you may want to add the
ent = start test
new test vectors to the ones already IC Tester Figure 7. Structure of
available in vect.tvc, and burn the lot 7 7:Self Check
esc
up/dn Menu option 7: Self
up2/dn2
into a new system EPROM. The pro- Check.
grams and general procedures to do so
will be described below. Remember HW Check: Test GND transistors
that all of the information presented 1:GND switches
below may be totally academic to you
if you are satisfied with the collection
of ICs in the default library.
Do not launch the programs HW Check: Test VCC transistors
2:VCC switches
directly from the floppy disk. First run
CHECK 1 from the DOS prompt as
indicated on the floppy to make sure
the data is intact and virus-free. Next, HW Check: Set/Clear DUT pins
copy all files on the floppy to a suitably 3:Set Pins
named subdirectory on the hard disk.

ICTVC.EXE HW Check: connect pull up/down


This is the Test Vector Compiler. Its to DUT pins
4:Pull
function is to turn a test vector source
file (like VECT.TVC) into a test vector
binary file. Next, the latter file has to
HW Check: Show ICC value
be appended to the microcontroller
5:ICC
program, ICT.BIN, to create a large
980029 - 2 - 17
binary file that can be burned into an

Elektor Electronics 4/98 49


bers added as well as the bytes gener-
8 IC Tester
8:Remote Mode
Normal keyboard functions: ated from each line;
up/dn = scroll up/down TMP.OUT: temporary file used by
ent = accept next menu ICTVC.EXE.
esc = return to main menu

Waiting for Host esc Any errors occurring during the com-
Esc: Cancel pilation process are recorded in
Figure 8. Structure of ERR.OUT only. They do not appear on
Menu option 8: the PC screen.
sync detected on no Remote mode.
RS232 i/f ?
TVCHK.EXE
This is a kind of shell program that
yes launches ICTVC.EXE, and enables test
Synchronized to host vector scripts to be debugged. For this
program to operate you have to con-
* * Connected * * esc nect the IC Tester to your PC via the 3-
Esc: Exit wire serial link. TVCHK should be
980029 - 2 - 18 launched with an appended parame-
ter which is either the COM port num-
ber (1-4), or the COM port address (in
name 4040
hex) followed by the associated inter-
9 ; 12-bit CMOS ripple carry counter
pins 16 rupt line (1-7). Example: TVCHK 2.
pinorder 10 11 1 15 14 12 13 4 2 3 5 6 7 9 8 16 Obviously, we are talking of the COM
; /cp mr q11 q10 q9 q8 q7 q6 q5 q4 q3 q2 q1 q0 gnd vcc port to which the IC Tester is con-
pindef I I O O O O O O O O O O O O G V
vect 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 nected! A screendump illustrating
vect 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 some of the options offered by TVCHK
vect 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 is shown in Figure 9.
vect 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
vect 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
EDT.BAT
vect 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
vect 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 This extremely small batch file is used
vect 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 to launch the word processor you will
vect 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 be using to load, modify and save test
vect 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
repeat 4 vector files. If you do not want to
vect 0 0 0 0 0 0 0 0 0 0 0 X X X 0 1 employ EDIT.COM, change EDT.BAT as
vect 1 0 0 0 0 0 0 0 0 0 0 X X X 0 1 required to make it point to your
endr favourite DOS text editor. Type the
vect 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1
repeat 8 name of the file you want to process
vect 0 0 0 0 0 0 0 0 0 0 X X X X 0 1 after EDT. In case VECT.TVC is too
vect 1 0 0 0 0 0 0 0 0 0 X X X X 0 1 large for your wordprocessor, consider
endr creating the part to be appended as a
vect 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1
repeat 16
separate file. Once the new test-vector
vect 0 0 0 0 0 0 0 0 0 X X X X X 0 1
vect 1 0 0 0 0 0 0 0 0 X X X X X 0 1
endr
vect 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1
Figure 9. Example
repeat 32 illustrating the opera-
vect 0 0 0 0 0 0 0 0 X X X X X X 0 1 tion of a test vector
vect 1 0 0 0 0 0 0 0 X X X X X X 0 1 script. The diagram
endr and the script are all
vect 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
repeat 64
you need to put the
vect 0 0 0 0 0 0 0 X X X X X X X 0 1 4040 12-bit counter
vect 1 0 0 0 0 0 0 X X X X X X X 0 1 through its paces.
endr
vect 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1
repeat 128
vect 0 0 0 0 0 0 X X X X X X X X 0 1
vect 1 0 0 0 0 0 X X X X X X X X 0 1 CD4040
endr
vect 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 Q11 1 V 16
DD
repeat 256
Q11
vect 0 0 0 0 0 X X X X X X X X X 0 1 Q5 2 Q5 Q10 15 Q10
vect 1 0 0 0 0 X X X X X X X X X 0 1
endr Q4 3 Q4 Q9 14 Q9
vect 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1
repeat 512 Q6 4 Q6 Q7 13 Q7
vect 0 0 0 0 X X X X X X X X X X 0 1
vect 1 0 0 0 X X X X X X X X X X 0 1 Q3 5 Q3 Q8 12 Q8
endr
vect 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 Q2 6 Q2 R 11 RESET
repeat 1024
vect 0 0 0 X X X X X X X X X X X 0 1 Q1 7 Q1 CLK 10 CLOCK
Q0
vect 1 0 0 X X X X X X X X X X X 0 1
endr 8 GND 9 Q0
vect 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1
vect 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1
vect 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 980029 - 2 - 19
iccl ; measure IC current
icch ; measure IC current

50 Elektor Electronics 4/98


Visit our Web site at http://ourworld.compuserve.com/homepages/elektor_uk

Indicate the name Quit the program.


of the binary file COM Port Addr: xxx Int: y
to be burned into Tell the PC which COM port to use for
the EPROM. communication with the IC Tester.
7: Generate EPROM
file. LARGER epromS
Remember, the Those of you who wish to add test
output format is vector scripts for ICs not supported by
binary! the default system EPROM may soon
8: Write GAL source find that the size of the .BIN file gen-
file GAL.PLD. erated by TVCHK option 7 exceeds the
capacity of a 512-kbit (64-kByte) EPROM
Test Vector like the 27(C)512. That is not a prob-
Checking lem, however, because the IC tester
A: Lib name: hardware accommodates larger
74xxx EPROMs like the 2-Mbit (256-kByte)
Indicate name of 27020 without problems. Because these
Figure 10. The TVCHCK the library contain- giant EPROMs are divided into 64-kByte
scripts have been program offers a use- ing the test-vector banks, bank-switching then has to be
debugged, they may be ful shell around the set to be implemented by means of outputs B6
appended to VECT.TVC with- utilities for test vector tested/debugged. and B7 of PIO device IC2. Address line
out using TVCHK. Next, the testing and compiling. B: IC name: 74:00 A17 is then also required, so you have
option Compile tv source Indicate name of to set jumper JP1 to the not-A position
from TVCHK is used to com- test-vector set to be when using a 27C020 EPROM.
pile the complete file for burning an tested/debugged.
EPROM. C: Test IC CONCLUSION
A good start for practising is the file This may take a while when many test You have been reading an article dis-
SMALL.TVC. To get the feel, try replac- vectors have to be applied (e.g., more cussing a test instrument which, in its
ing VECT.TVC by SMALL.TVC under than 10 minutes when testing a script standard version, allows a vast num-
menu option 2 in TVCHK. for the 4020). ber of integrated logic circuits from the
D: Trace Test Vectors 74 (TTL) and 4000 (CMOS) series to be
The main menu of TVCHK comprises This is the actual debugging tool. For subjected to some pretty thorough
the following options: each test vector, the expected logic testing. If you are not satisfied with the
states and the ones actually measured range of ICs that can be tested, a num-
Test Vector Compiler on the DUT are indicated. Errors are ber of powerful software tools are
1: Test vector source: VECT.TVC highlighted in red. Pin 1 is always available to roll your own, just using
Indicate name of test vector source file. indicated at the left-hand side, and the a common-or-garden PC (running
2: Edit & Compile tv source file. pin with the highest pin number, at plain old DOS) and, optionally, an
3: Compile tv source file. the right-hand side. REPEATENDR EPROM programmer capable of han-
4: View error report ERR.OUT. loops may be skipped by pressing the dling EPROMs with a capacity of at least
5: View list file LST.OUT. s key. 512 kbits. Happy testing!
6: EPROM binary file: EPROM.BIN Z: Exit (980029-2)

The 100% DIY approach


Although the best guarantee to successful construction of this pro-
ject is to order a ready-programmed GAL and EPROM from the
Publishers, together with a PCB and a floppy disk (order as a set, order
code 980029-C), there is are two alternative, cheaper, ways for the
more audacious.
The CD -ROM entitled P-C Hard & Software 97-98 (order code
986001-1) contains THE WORKS, i.e., all files to program your own
GAL and EPROM for this project, in addition to the master test vector
file, the 535s executable code, source code files in C and assem-
bly language, and all software utilities mentioned in this instalment.
So, if you are completely self-supporting, that is, have access to a PC,
a GAL programmer and an EPROM programmer, we suggest buying just
the PCB and the CD-ROM. The relevant subdirectory on the CD-ROM is
/INT. Remember, you can not run the test vector utilities from the CD-
ROM since they need to create files!
The second option for the more advanced among you is to buy only
the PCB and the floppy disk. The floppy contains a sub-set of the files
on the CD-ROM: not included are the assembler files and the PCB art-
work and circuit diagrams as originally supplied by the author. For the rest, everything is included to create and debug
your own test vector files, and prepare a binary file for burning into an EPROM, as described in this article. The .JED file
for programming your own GAL is also included.
Whichever option you choose, remember that any hardware or software component needed to build (and understand)
this project is available separately through our Readers Services.

Elektor Electronics 4/98 51

S-ar putea să vă placă și