Log In   |  Register Free Newsletter Subscription
Global TMW:
Skip navigation
Zibb
Subscribe to Test & Measurement World
RSS
Reprints/License
Print
Email
Average Rating:
  • (0)
    Rate this:
  • Test Ideas: Serial port tests digital circuits

    Check TTL signal levels using a PC’s serial port and a simple application.

    By Yury Magda, Consultant, Cherkassy, Ukraine -- Test & Measurement World, 4/1/2009 2:00:00 AM


    Have a test idea you'd like to share?
    Publish it here and receive $150.
    Send us your ideas.

    Also:
    Read other Test Ideas
    Read Design Ideas published by EDN

    pdf button

    A PC’s serial port provides signal lines that you can use to expand the number of input signals. With some additional circuitry tied to these lines, you can use the port to test digital TTL logic-level circuits. You just need to convert the TTL logic levels to RS-232 voltages and add a multiplexer to increase the number of signals that the serial port can sense.

    The schematic in Figure 1 (shown at the end of this article) uses a MAX232 IC to convert RS-232 voltage levels to TTL-logic levels. A 74HC4051 multiplexer lets you select any of four digital inputs and route them to the serial port. Software available from the online version of this article lets you control the RTS (ready to send) and DTR (data terminal ready) pins in the serial port that select the signal under test. The CTS (clear to send) pin then reads the signal under test into the PC.

    Download the software that lets you control the RTS (ready to send) and DTR (data terminal ready) pins in the serial port that select the signal under test.


    The four digital-input signals (A0–A3) from your device under test connect to the first four inputs (X0–X3) of the multiplexer. Only one of those signals can pass through to the X output (pin 3) at a time. By setting the appropriate binary code on the serial port’s RTS and DTR lines, you can select the signal to pass through the multiplexer. Table 1 describes the selection of inputs.


    Table 1. Binary codes for 
    the multiplexer inputs
    Signal to X pin RTS bit DTR bit

    A0

    0

    0

    A1

    1

    0

    A2

    0

    1

    A3

    1

    1

    The PC software, running on Windows XP, sequentially sets those binary combinations on the port’s RTS and DTR lines and reads the digital signal on the CTS line. When you click the “Check status” button on the user interface, the software reads and displays the status of the selected bit.

    The code is written in Microsoft C# .NET 2008, but it will run on the 2005 version as well. To create the application, launch the project wizard and select the “Windows Forms Application” from the C# .NET templates. Place the TextBox, Label, and Button components on the project’s main form and assign titles to them. You should place the SerialPort component on the design area of the project. Then, set the appropriate parameters for the SerialPort component (port number, baud rate, data bits, and parity and stop bits).

    When you build the circuit, follow all precautions in the manufacturers’ data sheets concerning the wiring of the MAX232 and 74HC4051. Remember to place bypass capacitors as close as possible to the IC’s power and ground. You can replace the MAX232 with a MAX225 or MAX233, neither of which requires external components.


    Figure 1




    Figure 1. This circuit lets you pass up to four TLL-level signals to an RS-232 port to read their status.
    Average Rating:
  • (0)
    Rate this:
  • RSS
    Reprints/License
    Print
    Email
    Talkback
    Similar Content from T&MW
    Reed Business Information Resource Center

    Featured Company


    Most Recent Resources

    Advertisement

    Related Microsite Content

    Related Links

    • No Related Content Available

    More Content
    • Blogs
    • Webcasts

    Sorry, no blogs are active for this topic.

    » VIEW ALL BLOGS RSS

    EDN's Designing with LEDs
    Advertisement
    TMW Video - www.tmworld.com/video/
    NEWSLETTERS
    Test Industry News
    Automotive, Aerospace & Defense
    Communications Test
    Design, Test & Yield
    Machine-Vision & Inspection
    Instrumentation



    Please read our Privacy Policy

    About Us   |   Advertising Info   |   Site Map   |   Contact Us   |   FREE Subscription   |   Editorial Calendar
    © 2010 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
    Use of this Web site is subject to its Terms of Use | Privacy Policy
    Please visit these other Reed Business sites