EmbeddedRelated.com
Forums

I2C / UART bridge?

Started by merapcb August 17, 2009
You mention that < queried. So that makes them half duplex.>> So can you control the
transmit (output) lines on the remote devices? If so make them
tri-state (float them) and then you don't need any muxes. Just
connect them all together to the '169 i/o pin for a multi-drop link
and only heave the individual slave enable it's transmit output when
responding to a query. Down side is if a remote slave failure occurs
it can kill the bus.
Hugh

At 01:26 PM 8/17/2009, you wrote:
> > There are three serial devices. Two of them are coming in via a
> > 3232 (which gives us 3v TTL) and one is natively TTL also.
>
>So, for mixing the 3 UARTs into one:
>1) You don't need an analog mux, a digital mux or switches (like the
>4066) will suffice. Even 3 OR gates will do it (inputs are MSP-TX
>and #SELx signal, outputs go to the 3 slaves RX signals).
>2) You can use a 3-input AND gate (or two 2-input AND gates) for
>mixing the slave TX lines into the MSP RX line.
>
>We still don't know what your I2C and SPI devices are.
>
>Regards,
>Michael K.
>
>--- In m..., "merapcb" wrote:
> >
> > --- In m..., "tintronic" wrote:
> > >
> >
> > > I don't recall anyone saying the slaves siganals were 0 - 3V in
> nature. What we know is they are UARTs, but not the voltage of the
> slaves. If there is a single TTL-232 transceiver, you'd need an
> analog switch capable of switching at least +12V and -12V. As I
> remember, the 405x family needs to be fed with a negative supply
> bigger in magnitude than the analog signal to be able to switch
> negative analog voltages, which I don't know if the OP is taking into accound.
> > >
> > > Regards,
> > > Michael K.
> > >
> >
> > I am the OP (phew...), so let me clarify again. There are three
> serial devices. Two of them are coming in via a 3232 (which gives
> us 3v TTL) and one is natively TTL also. So the muxing that is
> being talked about is not at the RS232 levels but at the 0-3v TTL
> levels. I hope this clarifies?
> >
> > (and this is turning in to a very interesting discussion... at
> least for me, thank you everyone! Keep it coming)
> >
>

Beginning Microcontrollers with the MSP430

Folks,

Thanks to all for the various ideas and insights about this issue.
After deliberation it was decided to use UART0 (by re configuring from I2C when needed and then back to I2C). MUX can be done with 4052 as Al suggested. Thank you Al.

I have posted the schematic of the proposed solution here:
http://tinyurl.com/lmn8k5

Comments are most welcome, I have not used this before so I hope I got it right.

Also, by the way, what is the best way of protecting the external RS232 lines from unwanted (accidental) voltages getting connected? (automotive environment). Diodes? Series resistors?

Thanks

PS - Pay attention to he nifty way of being able to connect more than one device to the same port (not at the same time) and having it sensed (well, nifty I think so)
You're welcome, the link doesn't work for me. When I used to design for
automotive I generally used a series resistor and an SCR clamp like an
SP720 (which I think is now discontinued) or the SP724. These could
handle typical automotive load dumps, unlike some other possible
solutions which were not designed to deal with such high energy loads.
They are available from Littlefuse. The SP724 is a quad array.

Al

merapcb wrote:
> Folks,
>
> Thanks to all for the various ideas and insights about this issue.
> After deliberation it was decided to use UART0 (by re configuring from I2C when needed and then back to I2C). MUX can be done with 4052 as Al suggested. Thank you Al.
>
> I have posted the schematic of the proposed solution here:
> http://tinyurl.com/lmn8k5
>
> Comments are most welcome, I have not used this before so I hope I got it right.
>
> Also, by the way, what is the best way of protecting the external RS232 lines from unwanted (accidental) voltages getting connected? (automotive environment). Diodes? Series resistors?
>
> Thanks
>
> PS - Pay attention to he nifty way of being able to connect more than one device to the same port (not at the same time) and having it sensed (well, nifty I think so)
>
--- In m..., OneStone wrote:
>
> You're welcome, the link doesn't work for me.
Here it is, it is actually uploaded in the file section here under "Uploads"

http://f1.grp.yahoofs.com/v1/kE6LSooh9eUwIoNdW5n1aHHJ8S-eYASwduV96MWE3H2Yc57D0ad1Ku50fD_VrM1suVfU0YQBwPn9URqat5B9VZLk-yux/Uploads/UART%20MUX%20with%204052.png

Hope this works
The link doesn't work but the schematic is easy to find with the
provided directions.

Howard

merapcb wrote:
>
>
> --- In m... ,
> OneStone wrote:
> >
> > You're welcome, the link doesn't work for me. >
> Here it is, it is actually uploaded in the file section here under
> "Uploads"
>
> http://f1.grp.yahoofs.com/v1/kE6LSooh9eUwIoNdW5n1aHHJ8S-eYASwduV96MWE3H2Yc57D0ad1Ku50fD_VrM1suVfU0YQBwPn9URqat5B9VZLk-yux/Uploads/UART%20MUX%20with%204052.png
> Hope this works

NOPE 'DOCUMENT NOT FOUND'

AL

merapcb wrote:
> --- In m..., OneStone wrote:
>> You're welcome, the link doesn't work for me. >
> Here it is, it is actually uploaded in the file section here under "Uploads"
>
> http://f1.grp.yahoofs.com/v1/kE6LSooh9eUwIoNdW5n1aHHJ8S-eYASwduV96MWE3H2Yc57D0ad1Ku50fD_VrM1suVfU0YQBwPn9URqat5B9VZLk-yux/Uploads/UART%20MUX%20with%204052.png
>
> Hope this works
>
--- In m..., OneStone wrote:
>
> NOPE 'DOCUMENT NOT FOUND'
>
> AL
>

Oh my..... but if I go to "Files > Uploads" on this forum then I do see it. Is there something I don't know about the file system here? Maybe it is not public? :-(
The problem is sometimes Yahoo provides a temporary link to a file and
as soon as you log off the link is broken. Whereas a link like the
following is permanent.
http://tech.groups.yahoo.com/group/msp430/files/Uploads/
Be suspicious of any link to a file with more than 80 characters in the
link Yahoo provides.

Howard
merapcb wrote:
>
>
> --- In m... ,
> OneStone wrote:
> >
> > NOPE 'DOCUMENT NOT FOUND'
> >
> > AL
> > Oh my..... but if I go to "Files > Uploads" on this forum then I do
> see it. Is there something I don't know about the file system here?
> Maybe it is not public? :-(

Al,
> When I used to design for automotive I generally used a series
> resistor and an SCR clamp like an SP720 (...)

Surely you meant a TVS (Transient Voltage Supressor) instead of SCR
(Silicon Controlled Rectifier), right?

merapcb,
> > Also, by the way, what is the best way of protecting the external
> > RS232 lines from unwanted (accidental) voltages getting
> > connected?

I guess, like assumed by Al, you don't mean to protect the device against a wrong connection but against voltage spikes.

I agree that series resistor and TVS bypass should be an adequate solution. I'd add ferrite beads in series too.

Regards,
Michael K.

--- In m..., OneStone wrote:
>
> You're welcome, the link doesn't work for me. When I used to design for
> automotive I generally used a series resistor and an SCR clamp like an
> SP720 (which I think is now discontinued) or the SP724. These could
> handle typical automotive load dumps, unlike some other possible
> solutions which were not designed to deal with such high energy loads.
> They are available from Littlefuse. The SP724 is a quad array.
>
> Al
>
> merapcb wrote:
> > Folks,
> >
> > Thanks to all for the various ideas and insights about this issue.
> > After deliberation it was decided to use UART0 (by re configuring from I2C when needed and then back to I2C). MUX can be done with 4052 as Al suggested. Thank you Al.
> >
> > I have posted the schematic of the proposed solution here:
> > http://tinyurl.com/lmn8k5
> >
> > Comments are most welcome, I have not used this before so I hope I got it right.
> >
> > Also, by the way, what is the best way of protecting the external RS232 lines from unwanted (accidental) voltages getting connected? (automotive environment). Diodes? Series resistors?
> >
> > Thanks
> >
> > PS - Pay attention to he nifty way of being able to connect more than one device to the same port (not at the same time) and having it sensed (well, nifty I think so)
> >
> >
> >
> >
> >
> >
> >
> >
> >
Read the spec for the SP724, you will find that each circuit is a
combination of SCR's resistors and a diode. Whereas a transient voltage
suppressor is actually a diode, or diode pair, and may be
uni-directional or bidirectional.

"The SP724 is a quad array of transient voltage clamping circuits
designed to suppress ESD and other transient over-voltage events. The
SP724 is used to help protect sensitive digital or analog input circuits
on data, signal, or control lines operating on power supplies up to 20VDC.

The SP724 is comprised of bipolar SCR/diode structures to protect up to
four independent lines by clamping transients of either polarity to the
power supply rails. The SP724 offers very low leakage (1nA Typical) and
low input capacitance (3pF Typical). Additionally, the SP724 is rated to
withstand the IEC 61000-4-2 ESD specification for both contact and air
discharge methods to level 4.

The SP724 is connected to the sensitive input line and its associated
power supply lines. Clamping action occurs during the transient pulse,
turning on the diode and fast triggering SCR structures when the voltage
on the input line exceeds one VBE threshold above the V+ supply (or one
VBE threshold below the V- supply). Therefore, the SP724 operation is
unaffected by poor power supply regulation or voltage fluctuations
within its operating range."

Cheers

Al
tintronic wrote:
> Al,
>> When I used to design for automotive I generally used a series
>> resistor and an SCR clamp like an SP720 (...)
>
> Surely you meant a TVS (Transient Voltage Supressor) instead of SCR
> (Silicon Controlled Rectifier), right?
>
> merapcb,
>>> Also, by the way, what is the best way of protecting the external
>>> RS232 lines from unwanted (accidental) voltages getting
>>> connected?
>
> I guess, like assumed by Al, you don't mean to protect the device against a wrong connection but against voltage spikes.
>
> I agree that series resistor and TVS bypass should be an adequate solution. I'd add ferrite beads in series too.
>
> Regards,
> Michael K.
>
> --- In m..., OneStone wrote:
>> You're welcome, the link doesn't work for me. When I used to design for
>> automotive I generally used a series resistor and an SCR clamp like an
>> SP720 (which I think is now discontinued) or the SP724. These could
>> handle typical automotive load dumps, unlike some other possible
>> solutions which were not designed to deal with such high energy loads.
>> They are available from Littlefuse. The SP724 is a quad array.
>>
>> Al
>>
>> merapcb wrote:
>>> Folks,
>>>
>>> Thanks to all for the various ideas and insights about this issue.
>>> After deliberation it was decided to use UART0 (by re configuring from I2C when needed and then back to I2C). MUX can be done with 4052 as Al suggested. Thank you Al.
>>>
>>> I have posted the schematic of the proposed solution here:
>>> http://tinyurl.com/lmn8k5
>>>
>>> Comments are most welcome, I have not used this before so I hope I got it right.
>>>
>>> Also, by the way, what is the best way of protecting the external RS232 lines from unwanted (accidental) voltages getting connected? (automotive environment). Diodes? Series resistors?
>>>
>>> Thanks
>>>
>>> PS - Pay attention to he nifty way of being able to connect more than one device to the same port (not at the same time) and having it sensed (well, nifty I think so)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>