Introduction
The product of this project will give a tool in terms of software, capable of extracting a vigorous testing for a given digital module (which is a logical unit) under a mass production.
Today, we have lots of testing algorithms with us, efficient enough to give a reliable result with some bearable errors. But when we cannot afford even a single error in our product, we choose to perform a vigorous-testing on this product where all the possible input-output conditions are tested as per the specifications. In the scope of its software requirement specifications (SRS) document, we name the product as "logic circuit testing tool". This SRS explains the requirement and expectations of the system to be developed and its probable users.
Scope of the project
The logic circuit testing tool (LCTT), as developed, will derive a vigorous testing of a given circuit for a given input signal set (0 or 1) on its input pins. The system will create input patterns to be fed into the input lines of the circuit under test and captures the output from its output lines to create a truth table for the circuit. This communication between 'LCTT' software and the given circuit occurs through the 'LPT' port of the computer (D-25 printer port/Parallel Port).
Dependencies
- Although the software will not be highly dependent on any type of computer-hardware. It will be capable to work on any PC-configuration higher than "386-intel", but the performance will be much faster on 'Pentium' configurations.
- The software will first develop a database with a masterpiece that has already been assured to be a perfect one by manual testing. After that, the software compares the truth table for other pieces under test with the database. For any mismatch, the system reports for the faulty circuit.
- The system will work only for the passive logic circuits, without any oscillators or power sources in them. The use of vibrators is also not involved.
- The system treats the unit-under-test just as a black box and does not do anything inside it. It is concerned to the input and corresponding output relations only. Hence the two different circuits equivalent to each other in their I/O results will be treated equally. For example, if unit under test is working like an XOR gate, the system will not detect if it is a direct XOR-gate I.C. or is composed of NAND or NOR gates. The result will be based on end point truth tables only.
The product LCTT In brief
- The product software interfaces with a masterpiece circuit (whose identical units are to be produced and tested), through the parallel port of computer to create a database truth table.
- Then the other identical units are attached to the computer in prescribed manner on the parallel port and a new truth table is created for comparison with the database truth table.
- For any mismatch, the unit is reported to be faulty.
- The system software needs not to tell the cause or spot of the fault.
- Separate modules for sequential and the non-sequential logic circuits.
User expectation/characteristics
- The user of the system is expected to be trained to make proper connections as expected between the unit under test and the parallel port of the computer.
- Any error in connection may lead to the failure of the system or faulty-results or even damage to the computer
- A brief knowledge of parallel port of computer is desirable.
- After making proper connections, the user is required to follow the instructions provided by the system itself.
The Connections
- The input lines of the circuit under test are required to be connected to the output lines of the 'LPT' port of the computer (Pin numbers).
- The output lines of the circuit under test are to be connected to the input lines of the parallel port of the system (Pin Numbers).
Logic Circuit Testing tool ( Program in C )
#include<stdio.h>
#include<dos.h>
#include<conio.h>
#include<math.h>
const LPTI=0x379;
const LPTO=0x378;
int IL,OL;
char refdata[256],data[256];
void creatPanel()
{
clrscr();
textattr(10);
gotoxy(1,2);
cprintf("___________________________________________________________\n\r");
gotoxy(10,3);
textattr(20);
cprintf(" Logic Circuit Testing Tool \r\n");
gotoxy(1,4);
textattr(10);
cprintf("--------------------------------------------------\n\r");
gotoxy(35,25);
cprintf("The tool is developed by Mr. Deepak Jain.");
}
void help()
{
clrscr();
creatPanel();
gotoxy(2,6);
printf("The Help..");
getch();
}
void refDataCreatA()
{
int i;
int j=1;
char c;
start: clrscr();
creatPanel();
textattr(15);
gotoxy(2,6);
cprintf("Place a pretested circuit as the Reference Circuit on the
parallel port \n\r & press 'Enter'\r\n");
textattr(10);
gotoxy(2,9);
cprintf("For help in any confusion press 'H'.");
c=getch();
clrscr();
creatPanel();
if(c=='h'|| c=='H')
{
help();
goto start;
}
textcolor(9);
gotoxy(2,6);
cprintf("Enter the number of Input Lines in the circuit: ");
scanf("%d",&IL);
gotoxy(2,8);
cprintf("\n\rEnter the number of Output Lines in the circuit: ");
scanf("%d",&OL);
for(i=0;i<IL;i++)
j=j*2;
gotoxy(2,10);
for(i=0;i<j;i++)
{
outportb(LPTO,i);
delay(2);
refdata[i]=inportb(LPTI);
}
}
void startTest()
{
int result=1;
int i;
int j=1;
for(i=0;i<IL;i++)
j=j*2;
gotoxy(20,15);
for(i=0;i<j;i++)
{
outportb(LPTO,i);
delay(2);
data[i]=inportb(LPTI);
if(data[i]!=refdata[i])
{
result=0;
break;
}
}
if(result==0)
{
textattr(132);
cprintf("ERROR:");
textattr(4);
cprintf(" The placed circuit is FAULTY...!!!");
getch();
}
else
{
textattr(138);
cprintf("The placed circuit is O.K.");
getch();
}
textattr(9);
gotoxy(17,22);
cprintf("To test another circuit press any key...!!");
gotoxy(17,23);
cprintf("To Exit press 'Esc'");
}
void main()
{
char c;
start1: creatPanel();
textattr(15);
gotoxy(2,6);
cprintf("Press 'A' for automatic generation of reference data.");
gotoxy(2,9);
textattr(10);
cprintf("For help in any confusion press 'H'");
c=getch();
if(c=='h' || c== 'H')
{ help(); goto start1;}
else if(c=='A' || c=='a')
refDataCreatA();
else goto start1;
start2: clrscr();
creatPanel();
textattr(73);
gotoxy(2,6);
cprintf(" The Reference Data has been created. \n\r");
textattr(2);
gotoxy(2,8);
cprintf("Replace the circuit with the other which is to be tested\n\r
& press Enter.\n\r");
textcolor(10);
cprintf("\nFor help in any confusion press 'H'.\n\r");
c=getch();
clrscr();
creatPanel();
if(c=='h'|| c=='H')
{
help();
goto start2;
}
startTest();
c=getch();
if(c!=27)
goto start2;
}
The author has taken his best efforts in preparing this document. The author makes no representation or warranties with respect to the accuracy or completeness of this document & specifically disclaims any implied warranties of fitness of the content for any specific purpose. The author takes no responsibilities for the success of work or expected outcome with the rules stated herein. The author will not be responsible and liable for any (financial or any other) gain or loss or any commercial damages.