i2c/rs232 converter

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

Reply to
Raphael
Loading thread data ...

Hello Raphael,

I2C is a multi-master protocal. The problem is that some masters do not know how to give up control.( single master )

If your "master" can handle being a slave, then you should have no problem with PC based I2C converters.

Google has tons of hits.

You last statment is really vague. Yes you will need a MAX232 device. After that is the rest of the project, so yes a micro will do this job.

If you are the Do-It-Yourself type, this link even has source code.

Good Luck

hamilt> Does anyone know of a way to put an rs232 ascii data stream onto an

Reply to
hamilton

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

Reply to
Tauno Voipio

Hi,

Unfortunately I'm using a BL233 based master which doesn't like being a slave and is not too happy with multi-master.

Excellent, this is just the sort of thing I was looking for, thanks very much.

Raphael

Reply to
Raphael

not

Hi I'm interested too on this argument, but I can't dowload the code from the link... it seems a broken link... can you post it or send me? ThankU very much Uest

Reply to
uest

Yeah, it seems not to display the schematic or code, kinda annoying. Does anyone have it archived or anything?

Raphael

Reply to
Raphael

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.