please help me... IC tester using microcontroller

Discussion in 'Embedded Systems and Microcontrollers' started by gracey, Feb 19, 2011.

  1. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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: Feb 19, 2011
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Have you tried to get a start with a flow chart? That would give you a structure for your program code.
     
  3. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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??
     
  4. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Post your schematic.
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988

    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.
     
  6. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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: Feb 19, 2011
  7. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    When's it due?
     
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Be nice now Bill:p
     
  9. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,866
    988
    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.
     
  10. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    I'm always nice :)
    Some students bite off more than they can chew and usually leave it till a week before it's due.
     
  11. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    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
    Code ( (Unknown Language)):
    1.  
    2.  
    3. // Your code would be something like this
    4.  
    5. //test one
    6. Dim good As Boolean
    7. Low (PORTB.0)
    8. Low (PORTB.1)
    9.     If PORTC.0 = 0 Then
    10.        good = true
    11.     EndIf
    12.           DelayMS(500) //so we don't miss ant thing
    13. High (PORTB.0)
    14. Low (PORTB.1)
    15.     If PORTC.0 = 0 Then
    16.         good = true
    17.     EndIf
    18.          DelayMS(500) //so we don't miss ant thing
    19. High (PORTB.0)
    20. High (PORTB.1)
    21.      If PortC.0 = 1 Then
    22.          good = true
    23.      EndIf
    24.      If good Then
    25.         High (PORTa.0)
    26.      Else
    27.            good = false // was bad
    28.           Low (PORTa.0)
    29.      EndIf
    30.  
    31. // Next test
    32.  
    33.  
     
    Last edited: Feb 19, 2011
    gracey likes this.
  12. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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: Feb 19, 2011
  13. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Are you only testing the 7400 IC?
     
  14. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Be nice. He's probably looking for some confirmation that he's on the right track.
     
    gracey likes this.
  15. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    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.
     
  16. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    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.
     
  17. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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...
     
  18. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    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: Feb 20, 2011
  19. be80be

    Senior Member

    Jul 5, 2008
    431
    57
    I tried this out on a 74ls00 and it worked fine
    http://www.youtube.com/watch?v=PR4EEqtq6vY&feature=player_detailpage

    You could make a real good tester. I have a idea for auto detect. I limited the the current to the chip to 5 mA

    I also limited all outputs and inputs to only .5mA I think these values should be safe on the 7400 to 7436 14 pin chips
     
    Last edited: Feb 20, 2011
  20. gracey

    Thread Starter New Member

    Feb 19, 2011
    14
    0
    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...
     
Loading...