Connect with us

Interfacing RS232 / I2C

Discussion in 'General Electronics' started by Greg T, Jun 21, 2005.

Scroll to continue with content
  1. Greg T

    Greg T Guest


    I'm trying to figure out if I can build a simple (read:cheap)
    temperature sensor by connecting an I2C compatible sensor ship (like the
    LM92) to an RS-232 port and get something meaningful out of it.

    A circuit diagram located at seems to
    indicate that this can be done without a MAX232 or other IC, but other
    places are selling RS232-I2C convertors for upwards of $200.

    Are there any other good sources of information about such interfaces?

  2. Robert Baer

    Robert Baer Guest

    I do not know anything about the I2C protocol or voltage levels.
    If the levels are at least 3V apart, then driving RS-232 is possible.
    One would need to write a special routine, and AFAIK all of the GUIs
    are jealous masters concerning I/O, making that task almost impossible.
    In any event, one could use one of the hand-shaking lines (to bypass
    the UART); either pin 5 CTS, pin 6 DSR or pin 8 CD will do.
    Do not use any Maxim parts in a design; most of what they advertise
    is vaporware.
  3. Andy P

    Andy P Guest

    While you can do the RS232-I2C thing relatively cheaply, most of it has
    to be done in software on the computer, and it's a pita. I have done it
    , but the circuitry gets pretty complex thanks to the bi-directional
    nature of the protocol, and it's inversion relative to the pins on the
    serial port.

    The easiest implementation (without a microcontroller) I've seen is the
    parallel port. It requires only a buffer IC and software
    implementation. When working with windows NT,2k, or xp you will need
    something like DLportIO (google it). If working with 9x series windows
    you can directly access the hardware. Linux already has numerous
    programs written to do it, or you could write your own. Macs I ahve no
    idea about.

    In the end, I would reccommend using a microcontroller. You could use
    soemthing like a Picaxe to make it relatively simple as it's jsut
    programmed in a version of basic, and has RS232 and I2C built into it.

    --Andy P
  4. Greg T

    Greg T Guest

    For anyone else who's keen on a simple serial port sensor:

    I found what I was looking for at,
    which includes schematics for a simple DS1621 sensor -> RS232 interface,
    including source code for the driver.

    Thanks to those who have replied,

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day