Digital IC Tester


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Location
    INDIA
    Posts
    89

    Default Digital IC Tester

    I try to write code for digital ic tester. problem is how i define pin as toggle.
    eg. i want one place porta.0 as input pin and other place i want same pin as output. is it possible ?

    this is my example that is working for 7414 AND 7404

    ' ---- CHIP PIC16F877A -----

    INCLUDE "MYLCD.BAS"
    CMCON = 7
    ADCON1 = 7

    INPUT PORTB.7
    INPUT PORTB.6

    PAUSE 100

    MAIN: PAUSE 500
    LCDOUT $FE, 1
    LCDOUT "IC TESTER"
    IF PORTB.7 = 1 THEN GOTO TEST
    GOTO MAIN

    TEST:
    PAUSE 50
    LCDOUT $FE,1
    LCDOUT "SEARCHING......"
    PAUSE 500
    OUTPUT PORTA.2 ' ---- +5v for pin no. 1 of unknown digital ic (for 14 pin ic )
    OUTPUT PORTC.7 ' ---- GND for pin no. 7 of unknown digital ic (for 14 pin ic )
    INPUT PORTC.6 ' ---- input from 2 no. pin of unknown digital ic (for 14 pin ic )
    HIGH PORTA.2 ' high pim 1 of unknown digital ic
    LOW PORTC.7 ' Low GND pin
    IF PORTC.6 = 1 THEN GOTO LS14
    pause 50


    WRO:
    PAUSE 50
    LCDOUT $FE,1
    LCDOUT "BAD CHIP......"
    PAUSE 1000
    GOTO MAIN

    LS14:
    PAUSE 50
    LCDOUT $FE,1
    LCDOUT "7404, 7414 FOUND."
    IF PORTB.6 = 1 THEN GOTO MAIN
    GOTO LS14

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Code:
    TRISA.0=0 ' Set PORTA.0 as output
    TRISA.0=1 ' Set PORTA.0 as input
    OR
    Code:
    OUTPUT PORTA.0 ' set PORTA.0 as output
    INPUT PORTA.0  ' set PORTA.0 as input
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Digital Out on an A/D pin safe ?
    By mr.sneezy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st January 2009, 23:48
  2. PIC 18f4680 DIGITAL INPUTS
    By MegaADY in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th July 2008, 08:34
  3. analog and digital
    By lerameur in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th June 2008, 03:40
  4. Replies: 4
    Last Post: - 24th January 2007, 23:20
  5. A/D versus Digital I/O
    By dallennn in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 11th November 2006, 05:31

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts