please help me... IC tester using microcontroller

Thread Starter

gracey

Joined Feb 19, 2011
14
hello everyone..

Im currently making my project "digital IC tester" using PIC16f877a..
Im going to test 74-series IC's specifically AND, OR, NAND, NOR, XOR, XNOR and INVERTER.. Im planning to use portB for the output (pins of the IC using socket), portC for the input portD for the keypad and portA for the 7 LED.The LED serve as the indicator that the IC is in good condition... This is my idea for the hardware.. my problem is the program.. Im new in microcontroller that why I had a hard time in doing this project...

any help would be highly appreciated...

by the way I tried mikrobasic for the program..
 
Last edited:

Thread Starter

gracey

Joined Feb 19, 2011
14
Yes,..the flow goes like these:

ex: for AND gate..
::check the 4 gates within the IC
::4 LED lights up which indicate that all the gates are okey and and 1 LED indicates that the IC is in good condition,.
::else, if one of the gates is damaged only the 3 LED show lights..

Im not good enough in programming, can you help me a bit for the codes??
 

spinnaker

Joined Oct 29, 2009
7,830
Yes,..the flow goes like these:



Im not good enough in programming, can you help me a bit for the codes??

Then you first need to teach yourself to program.

Again another post that should be in the embedded forum.

You are trying to do a too big of a project with limited knowledge. You need to start simple then the big project will become much easier.

Your tester will basically do two things. It will turn something on / off and it will sense something is on / off.

There are many examples of how to turn an LED on and off in Mikro basic. Start with one of those examples. You will then use this knowledge to manipulate the inputs to your chips under test and to turn on your LEDs.

There are also examples of sensing a push button switch. Use this examples to learn how to apply the knowledge to sensing the output of your gate under test.
 

Thread Starter

gracey

Joined Feb 19, 2011
14
Actually, I've tried making program for AND gate ..
I got a problem when it comes 2 d manipulation of the port if another IC is inserted in the IC socket.. specially for 3 input IC and inverter...I tried my best, but its hard for me...I really need your help..
 
Last edited:

spinnaker

Joined Oct 29, 2009
7,830
Actually, I've tried making program for AND gate ..
I got a problem when it comes 2 d manipulation of the port if another IC is inserted in the IC socket.. specially for 3 input IC and inverter...I tried my best, but its hard for me...I really need your help..
You need to follow my advice and start simple. If you know how to do outputs on a microcontrollers and you know the basic operation of logic gates then the rest will be easy.

Write a program to turn on a port and post it here. Hint you set latches and read ports.

Disclaimer: I have no experience with Mikro BASIC but do have experience with Microchip C18 but the principals will be the same.
If you wanted to code in C18 it would be easier for me to help but there should be other forum members that know Mikro BASIC. But you are going to have to show some effort on your own before anyone is going to help.
 

be80be

Joined Jul 5, 2008
2,072
I didn't draw all parts you'll need to add some caps Vdd to gnd a resistor to pull mclr to vdd

Maybe help get you going

Little code sample
Rich (BB code):
// Your code would be something like this 

//test one 
Dim good As Boolean 
Low (PORTB.0) 
Low (PORTB.1) 
    If PORTC.0 = 0 Then
       good = true
    EndIf 
          DelayMS(500) //so we don't miss ant thing 
High (PORTB.0) 
Low (PORTB.1) 
    If PORTC.0 = 0 Then
        good = true
    EndIf 
         DelayMS(500) //so we don't miss ant thing 
High (PORTB.0) 
High (PORTB.1) 
     If PortC.0 = 1 Then
         good = true
     EndIf
     If good Then 
        High (PORTa.0)
     Else 
           good = false // was bad
          Low (PORTa.0)
     EndIf 

// Next test
 

Attachments

Last edited:

Thread Starter

gracey

Joined Feb 19, 2011
14
here's part of the code I made for AND gate:

i used portd instead of porta here....


trisb = 0x00
trisc = 0xff
trisd = 0x00

portb =0x00
trisc = 0xff
trisd =0x00

i = 0
led =0
j = 0

for i =0 to 3
for led = 0 to 3
for j = 0 to 7
if portc.(i) = 0 then
portb.(j) = 0x55
if portc.(i) = 0 then
portb.(j) = 0xaa
if portc.(i) = 0 then
portb.(j) = 0xff
if portc.(i) = 1 then
portd.(led) = 1
delay_ms(1000)
end if
end if
end if
end if
next j
next led
next i

if portc.(i) = 1 then
trisd = 0x00
portd = %00011111
end if
 
Last edited:

be80be

Joined Jul 5, 2008
2,072
gracey What basic are you using mine is swordfish

You could use any port you want I would go with a bigger chip I just posted a idea. But if I was going to make a real tester I would use a 18f4520 40 pin chip, that way you would have three full ports for the chip in test and room to set what chip your testing.

I would probably forget the leds and use UART and output to a terminal or a serial LCD.
 
I'm being nice. I'm asking because unless you're testing only a very limited number of 74 series ICs (ie all the same power pins) your circuit is going to get complex fairly fast. Is it going to auto identify the IC? If so how? You'll need to limit current on all the I/O pins so you don't damage an output pin when trying to determine the IC type. You'll have to be able to determine the VEE & VCC pins, some TTL had open collector outputs so you'll need programmable pullups and probably pulldown, some flip/flops, a couple of TTL were monostables and another was RAM, I think there was a PROM in there somewhere.
There are hundreds of TTL ICs out there. A suggestion would be limit it to a handful of 74 series parts.
 

Thread Starter

gracey

Joined Feb 19, 2011
14
I used MIKROBASIC for the program..

The IC's that are going to be checked are as follows:
AND, NAND, OR, NOR, XOR, XNOR and inverter... It will also check 3 input AND & OR gates...
 

be80be

Joined Jul 5, 2008
2,072
Yep there are about 500 of them. A little smoke never hurts just makes you think harder the next time.

It would take a lot of work to make a tester for all of them and it be-able to tell what chip you plugged in. The circuit I posted is just a starter, Like a Ice beaker.

But like I said the op will have to add some caps and resistors, that one will test the chip thats in it with out harm but some of the chips will kill it real fast.

I would use the pic to test for shorts and let it power the test chip.

Here a link with a good starter list http://en.wikipedia.org/wiki/List_of_7400_series_integrated_circuits

And this has pinouts http://romux.com/pinouts/74-series/ttl-ics:--7400...7449

7400 to 7430 have same pinout for gnd and VCC There all 14 pin chips so set the pic to cut the power when it starts dumping mA
 
Last edited:

Thread Starter

gracey

Joined Feb 19, 2011
14
thanks a lot for the idea... Im really sorry, Im only familiar to mikrobasic so I used it for the program..

I attach here the code for 74ls08 and 74ls32....
Now, my problem is 74ls11 (3 input AND) because I should use the same assignment of pins from the PIC to the IC socket..

pin # PIC port
1 b.0
2 b.1
3 c.0
4 b.2
5 b.3
6 c.1
8 c.2
9 b.4
10 b.5
11 c.3
12 b.6
13 b.7


Im going to use these assignment of pins for 3 input and where:

74ls11:
gate1 - (b0,b1,b7) input & (b6) output
gate2 - (c0,b2,b3) input & (c1) output
gate3 - (b4,b5,c3) input & (c2) output

can you give me an idea on how I should start the program?? thanks...
 

Attachments

Top