Connect with us

i2c to rs232 slave converter

Discussion in 'General Electronics' started by Raphael, Jan 30, 2004.

  1. Raphael

    Raphael Guest

    Does anyone know of a way to put an rs232 ascii data stream onto an
    i2c bus as a slave device.

    For example, I have an i2c bus which has a master already. I need to
    give this master the data which is coming from an rs232 device, the
    problem is that all the rs232 to i2c converters I've seen are masters
    which assume it'll be plugged into a PC.

    I assume that I need to convert levels with a MAX232 and then put that
    data into i2c format. I'm hoping there's a single chip which will
    convert the rs232 data into i2c data for a slave device, but any kind
    of solution would be appreciated.

    Raphael
     
  2. Raphael,

    I ever build one using a PIC16F73. This chip contains a UART as well as an
    I2C interface so programming is straight forward. Nevertheless you has to
    consider a few things:
    - Your device needs an I2C address that should be polled by the master.
    - Once the slave reacts, the data the master asks for should be available
    within limited time. Otherwise you will either send wrong data or hold the
    interface too long.
    - This chip does not automatically stretches the clock after an
    acknowledge from the master. So if the data is not available immediately
    you'll have to strech that clock yourself. It was the first thing I did in
    the interrupt routine after an I2C interrupt had been identified.

    It may be worthwhile to look for a newer chip. For instance, take a look at:
    http://www.voti.nl/pic/n_index.html

    petrus
     
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

-