Design and Implementation of Microcontroller Based Logic Gate Tester

In electronics, testing tools is a major part when it comes to laboratory work. It’s a part of everyday activity to use one or several too while working on electrical system. No workman can do without testing tools. It is of great importance on practical basis. Thus the aim of this research is to build a Logic tester capable of testing most 74 series logic gates integrated circuits using a Microcontroller (AT89C51). This project is basically designed test or determines the condition of the gates in a logic gate IC by simulating its characteristics using the truth table of the particular IC. Different design approaches were compared and finally one approach was implemented. Each individual module was designed separately. After successful simulation and testing, they were put together to create the finalized version.


Introduction
The Logic gate tester is used to test integrated circuit logic ICs. We don't need to rig up different kinds of circuits for different kind of logic ICs, each time we need to test them. The chip tester verifies the functionality and timing of some variety of 7400 series logic gate integrated circuits. Students taking Digital Logic Design Lab, Use these chips often in their laboratory. The IC to be tested should be placed on the ZIF socket and the Microcontroller prompts the user to enter the IC number of the chip to be tested. After entering it the microcontroller will check the IC as per the truth table of the IC which is stored in its ROM. It will check each and every pin of the IC and produce the Output detail. Like "Gate 1 is good", "Gate is bad", "Counter 1 is good" etc Two voltage levels can be represented as the two digits 0 and 1. Signals in digital electronics have two distinct voltage levels with built-in tolerances for variations in the voltage. A valid digital signal should be within either of the two shaded areas as shown in (Figure 1).

Methodology
Different design approaches were compared and finally one approach was implemented. Each individual module was designed separately. After successful simulation and testing, they were put together to create the finalized version. Each individual module was designed separately. After successful simulation and testing, they were put together to create the finalized version ( Figure 2).

Regulator
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator IC have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. They include a hole for attaching a heat sink if necessary (Figure 3

Analysis of Design
This section describes the actual implementation of the research "Design and Implementation of Microcontroller Based Logic Gate Tester." From the analysis of the theories in design methodology and specifications made to govern the construction. After successful simulation and testing, the project was put together to create the finalized version.

Component calculation
Gathering of components from the specification in the circuit design precedes assembly or construction of the project. I started with listing the component according to types and values. The components were obtained at an electronic parts store in the market. Equivalents were sourced where necessary.

Hardware implementation
This involves the actual construction, which is the hard wiring of the circuit already prototyped. This consists of thin copper strips on one side and plain insulator board on the other side punched with hole at 0.1-inch matrix interval. Components are mounted on the plain side and soldered on the copper side. The copper strip runs from left to right and all components soldered on the strip are automatically joined together; where that is not required the strip is cut at appropriate point with drill or sharp object. All the components were mounted and soldered taking care that the transistors, electrolytic capacitors, diodes and the regulator were mounted the correct way round. The LED was connected with flexible wires, so that they may be mounted on the case. While soldering the solder blobs should not touch the adjacent tracks otherwise there will be short circuit. Finally the IC should be mounted on the IC socket and tracks under the socket were cut to separate the pins.

Input interface wiring diagram:
The circuit arrangement below shows the input keypad interface implementation wiring diagram ( Figure 5).  Microcontroller system wiring diagram: Here we have the microcontroller system implementation wiring diagram. The LCD display units was connected at port 1, Keypad set input at port 3 and finally the ZIF socket at Port 2 and port 0 ( Figure 6).

Output display interface wiring diagram:
The display was interfaced at port 1 of the microcontroller. As shown below (Figure 7 & 8).

Microcontroller code development/ software implementation
The code development is very much the same as for any computer. The microcontroller software development is based around a programming environment which will normally include: • A text editor to develop the source program code • An assembler to produce a machine executable program with linked library modules • Some form of debugging to allow the program to be tested • Access to a programmer to program the target device.
• The job of the assembler is to convert the source code produced by the programmer into an object code file. It works by replacing each line of assembly instruction code with the corresponding machine code instruction that will be executed on the target microcontroller.
The object code file cannot be executed on the target microcontroller. It needs to be passed through a program called a linker. The job of the linker is to take the object file produced by the assembler and link it with standard library modules (that have already been pre-assembled into object files) to produce a complete working executable file that can be loaded into the memory of the microcontroller. Sometimes the assembler and linker are combined into one program so that assembling a source program automatically links it as well. This is the case with the 8051 Assembler.  Figure 9, below shows the different stages in the production of a program. Note that the only stage that requires a lot of user input is the initial production of the user source code file. The rest of the program production involves using the Assembler and Linker tools.
• 'Filename' is the name of the program that the user is developing, thus the output of the Editor is the source file 'filename.asm'.

•
The output of the Assembler is the object file 'filename. obj'.

•
The Linker links the 'filename.obj' with any Library object files that the program might use. It will also link any user object files that the user might want to include.
The Linker output is the executable file to run on the target system.
A program called a Loader or a microcontroller programmer takes your executable file from the hard disk and loads it onto the target microcontroller.

Complete system test
When the system is switched on, the microcontroller initializes the LCD, and writes the name of the project on screen. Then it prompts the user to input, the IC number. Once that is done the microcontroller verifies the functionality of the logic gate making reference to the truth table. If the gate is OK it will signal Gates OK if gated is bad it will signal Gate bad. If the Logic gate IC is not in the data base it will also display that on the screen. The part number of the IC entered must be maximum 5 digits and will have the suffix (74xxx). The cancel button could be pressed to clear LCD screen for another data entry [1][2][3][4][5][6][7][8].

Conclusion
The research, "Design and Implementation of Microcontroller based Logic gate tester", proved to be a very interesting research to embark on, however whenever there is a task to perform, there could be problems likely to come up. In the course of this research the integrated logic gate tester was used to test logic gate Integrated Circuits (ICs). We can easily test any digital IC using this kind of an IC tester. For testing an IC, we need to use different hardware circuits for different ICs; like we need a particular kind of tester for testing each individual logic gate ICs. The task of accommodating each logic IC routine is enormous mistakes are prone to happen. So there is continues debugging of the code and hardware matching to the system. To test a particular digital IC, one needs to insert the IC into the IC socket and enter the IC number using the keyboard and then press the "ENTER" key. The IC number gets displayed on LCD unit. If the IC being tested is a logic gate, then each of the gates will be tested for functionality.