Re: i2c/rs232 converter

From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 01/31/04


Date: Sat, 31 Jan 2004 13:20:14 GMT

Raphael wrote:
> 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.

I'd take an AVR with both TWI (Atmel's name for I2C compatible
interface) and asynchronous serial interface and program it to
handle the interfacing. The internal RAM may be on the small
side for serial data buffering, so a model able to have an
extrernal RAM chip may be in order (e.g. Atmega8).

The TWI in AVR's can be used a a slave interface. The master must
be able to understand the clock clamping hold, though. The problem
with a slave interface is timing: the master is pretty free to
handle the bus timing, but the slave is (according to spec) free
to make the transfer wait by clamping the clock line when low.
To react fast enough, the clamping must be in the interface
hardware.

HTH

Tauno Voipio
tauno voipio @ iki fi



Relevant Pages

  • Re: JOP as SOPC component
    ... order of six lines of code per interface for a point to point connection, ... I think that this is actually the power of SOPC builder. ... When you have a latency aware master and a slave then there is the one ... aware master/slaves to ones that are not, multiple bus masters, etc. ...
    (comp.arch.fpga)
  • Re: [RFC/PATCH 0/22] W1: sysfs, lifetime and other fixes
    ... > which is managed by bus master dirver, but also some logic over it, ... Only if caller would send request and continue one woudl ... > which will implement only read/write interface. ...
    (Linux-Kernel)
  • Re: RFC on VHDL LRM 93[8.4.1]
    ... that the way you defined the slave and master that they already were ... would perform address decoding and arbitration functions. ... and slave side then this single entity can implement the bus protocol. ...
    (comp.lang.vhdl)
  • Re: RFC on VHDL LRM 93[8.4.1]
    ... Are you wanting to be able to declare a mode "master", ... and send the entire bus to them. ... arbiter) and slave modes, ... where you have a record type that defines the 'in' ...
    (comp.lang.vhdl)
  • Re: CDVD on Iyonix
    ... and put the jumper on slave. ... Therefore you must be using the second interface. ... Well I get the same error and my DVD drive is on the second disc lead ... and set to Master. ...
    (comp.sys.acorn.hardware)