Voltage level adaptation

Screwface
Dear all,

I haven't seen the question on this forum, I googled a bit but didn't find
THE solution.

I have to interface a TTL level microcontroler to the mini for a serial
communication.
As the mini is 3.3V, the levels should be adapted.

In a more general way, all the levels should be adapted for analog and
digital inputs if they are not 3.3V as I have not seen in the datasheet
there were 5V tolerant inputs.

I thought this matter was easy to solve, but I have seen many solutions
which don't really satisfy me.

I propose to discuss this topic here.

For serial communication:
==========================
I thought some integrated circuits already exist to do the job but didn't
find them. I looked at the MAX3232, as it is the one used on the mini, but
looking at the datasheet, it seems the outputed voltage is RS232 ones :
+12V / -12V. Some persons on forums report the use of SN74LVC1T45 but it is
a single way transceiver. This means we should use 2 parts for a full
duplex communication. I would prefer an integrated component in the max232
spirit.
Does someone have a better idea?


For digital inputs:
===================
I have not found a generic solution. For single inputs, maybe using
optocouplers, or voltage divider using R1=10K and R2=20K resistors or
R1=1.7k and R2=3.3K.
For multiple inputs, mabe using a circuit such as MAX3000E could be the
solution. This circuit is bidirectionnal so it can be used with other MCUs


For digital outputs:
====================
For buses, maybe using some latches such as SN74LS07 (to convert 3.3V to
5V)


For analog inputs:
==================
I have not seen any other solution than using a voltage divider as
mentionned in digital inputs. Maybe it should be used with high precision
resistors and an op amplifier to avoid an imprecise measurement.
Would a 741 do the trick?

Regards

Sources :
http://www.nxp.com/documents/application_note/AN240.pdf
http://api.ning.com/files/ASjF3*J4-wakk42W6m2BpfoVXXMzjWOVJ4EAZu78FyOHQH...
http://www.savagecircuits.com/forums/showthread.php?585-Mixed-Voltage-Sy...
http://www.ti.com/lit/an/slaa148/slaa148.pdf

davef
Screwface,

You have done a good job at gathering information.

Serial: MAX3232 connected to COM2 looks right. The +12/-12V are the signal
levels on the cable connecting the two transceivers together.  If your uP
is running off 5Volts then you can use another one at that end.

Digital: I use a MC14504BCP for that job in a SD card to uP interface. Both
inputs and outputs are covered.  You might need to look at what drive
capability the "converter" has if you are trying to drive some current into
an external device, ie a MOSFET.

Analog: just a resistive divider and for extra protection you could put a
3V3 zener on the mini2440 inputs to prevent accidents. Check out the
TL7726, I use one on 6 inputs for protection.  Check the operating voltage
range.

Some of the S3C2410 inputs are suppose to be 5Volt tolerant, but Samsung
support wouldn't cough up the information.  Best to be careful.

Screwface
Hi Davef,

Thank you for your feedback.

Serial: you mean using MAX3232 on the mini side to convert 0V/+3.3V to
-12V/+12V and a MAX232 on the other side ton convert +12V/-12V to 0V/+5V?
That's an idea, but I thought it was possible to connect both transceivers
together using 0V/+5V TTL signals and only one level adaptor.

Digital: MC14504BCP exist in PDIP which is not the case of MAX3000E, and it
is cheaper. I think I'll follow your advice.

Analog: Thanks for the tip with TL7726, I'll have a deeper look!

davef
Serial:

Sure, that's OK. In which case you only need another MC14504BCP

Ferite
I have connected TTL (5V) UARTS to the serial ports of Mini2440 without
problem. As for the I/O I don't know if they are 5V tolerant.

davef
> As for the I/O I don't know if they are 5V tolerant.

And even Samsung won't tell us!

To guarantee 5V UART operation you need to check the logic threshold levels
on its inputs.  But, as you have found under your conditions you got away
with it.

Screwface
Serial:

I've seen on andahammer website they sold GPS modules to be connected to
the mini (http://andahammer.com/stargps/). Those GPS modules use 5V TTL
logic. And in the schematics of the mini, each serial connector is provided
with TxD, RxD, 5V and GND. Should we understand that serial ports are 5V
tolerant, as Ferite has experienced? I had a look at the S3C2440 datasheet
but didn't find electrical characteristics of serial ports?

I have only seen at the beginning of chapter 27, pages 554 and 555:

Absolute Maximum Ratings
DC Input Voltage (VIN) : 3.3V Interface / 5V Tolerant input buffer ==> 6.5V

Recommanded operating conditions
DC Input Voltage (VIN) : 3.3V Interface / 5V Tolerant input buffer ==>
-0.3V Min / 5.25V Max.

Now the question is: which inputs are 5V tolerant...

davef
There were some quite long discussions on this topic.  Both myself and the
other guy tried to get information out of Samsung as to which ports were
really 5V tolerant.  We use the S3C2410 in commercial product at moderate
volumes and we still couldn't get the information out of Samsung Support.

As you have found there are "references" to 5Volt tolerant inputs in the
datasheets, but it seems to me that it could be a holdover from older
documentation.  I think if you look at a newer part references to 5V
tolerant inputs have been dropped.

Another possibility is that some ports are 5V tolerant, just not
guaranteed!

The inputs are quite easy to protect. Certainly a lot easier than trying to
replace the S3C2410.

My last comment above related to the inputs on the UART not the S3C2410.
Just need to make that clear.

Dave