Electronic Design

  
Reprints     Printer-Friendly    Email this Article    RSS        Font Size     What's This?


[Ideas For Design]
Use A PC Serial Port For Pulse-Encoded Communications

Ed Rojas  |   ED Online ID #12237  |   April 13, 2006


The simple method described here evaluates a one-wire device that uses pulse-width-encoded communications from a PC serial port. Communications errors such as parity and acknowledge are monitored. The hardware interface to the PC is a MAX232 driver/receiver, and the slave in this example case is a Texas Instruments TMP141 temperature sensor. The circuit can be expanded to four sensors on the same bus by using the TMP141's four programmable addresses derived from A0 and A1 (Fig. 1).

The main scheme for this method is to use the built-in timing of the RS-232 baud-rate control. Three "bit codes" are required for most communications: (Start bit), data (bit 0), and data (bit 1) (see the table and Fig. 2). Using mscomm in Visual Basic, the PC COM port is configured to output 8 data bits, parity None, 1 Stop bit, and flow control none. The setting of COM port data bits along with the baud rate determines the bit-code widths. Baud rate is changed between bits to create the different pulse-width codes.

Reprogramming the PC COM port baud rate can create a delay of 20 to 30 ms between bits, but this is okay because there's no time-out event in the slave. Yet the delays can make it a challenge to read the output on a logic analyzer. The Visual Basic program controls two-way communication to the TMP141 sensor. The program allows internal registers to be read and programmed. Details of communication execution are in the Visual Basic program, which can be downloaded at ED Online 12237 at www.electronicdesign.com.


Reprints   Printer-Friendly  Email this Article  RSS    Font Size   What's This?


  • A New Design Inflection Point
  • Forecasting Industry Growth For 2009 And Beyond
  • EDA Retools To Exploit Multicore Architectures
  • Design And Verification Move Up In Abstraction
  • EDA Retools To Exploit Multicore Architectures
  • A New Design Inflection Point
  • Design And Verification Move Up In Abstraction
  • Challenges Lurk For 22-nm Physical Implementation
    1) 1-A Switching Regulators Operate With 96% Efficiency To Replace Linear Regulators
    (511 views today)
    2) Battery Pack Improves Li-Ion Management For Electric Vehicles
    (304 views today)
    3) New Power Approaches May Fuel Analog Job Opportunities In Security And Health Applications
    (299 views today)
    4) Build A Smart Battery Charger Using A Single-Transistor Circuit
    (296 views today)
    5) Step-Down Switching Regulator Provides 60-V Input Transient Protection
    (152 views today)
    ALL TOP 20



    POST YOUR COMMENTS HERE
    Name:

    Email:
    Your Comments:

    Enter the text from the image below


    Please refresh the page if you have trouble reading this text.

    Search Electronic Design
         
      
     
    Web Seminar
    Sponsored By:
    Title: Read Pacing: A Performance Enhancing Feature of PCI Express Gen 2 Switch Devices
    Speakers: 
    Date: 07/01/08
    Register: 

    Electronic Design Europe Electronic Design China EEPN Power Electronics Auto Electronics Microwaves & RF
    Mobile Dev & Design Schematics Find Power Products Military Electronics EE Events Related Resources