labo wrote: Er2lub wrote: So write what buses you are talking about.
.
I have a device giving TX, RX 3.3V so no such problem here.
The point is, I was looking through various examples on the net, looking for an answer to my question about pin voltages.
So you would have to do a longer lecture, in one sentence it is impossible to answer.
Most uC's accept 5V on their inputs, especially interface inputs like SPI, I2C, UART etc. Whether and which uC pins accept 5V can be read in the note. I will leave it at that and write briefly which interfaces and which currents are or are not a problem.
* I2C, 1-Wire and others with OC(OD) you pull up to +3.3V and there is no problem. The maximum voltage and current is determined by the pull-up resistor. A circuit with 5V levels will correctly accept levels from the 3.3V 'outputs' even if it is a traditional TTL circuit.
* 3.3V output 5V input, there is no problem for reasons as above
* 3.3V input 5V output
Here it can be different. The problem is the diode at the input of the circuit. At over Vcc+0.6V (3.9V) it starts to conduct. It will typically withstand a current of 20..30mA. Worse still, once this is exceeded, the parasitic thyristor will trip. The only way to disable it will be to disconnect the power supply. I have described the case of the most typical input. However, the design can be different, e.g. a Zener diode at the input of the circuit.
If the output is less than the permissible 20mA, for example, then even a million volts is not terrible.
In practice, due to the MOSFET transistors on the outputs, PROVIDED that directly connecting the 5V output to the 3.3V input will not damage it. Naturally, I DO NOT RECOMMEND such solutions, but a MOSFET is what it is and when too much current flows through it, it will heat up, when it heats up, it will increase its resistance stabilising the current at some level. I emphasise that IT DOES NOT WORK THAT WAY, but such a solution may work (under certain conditions) reliably for several decades in other conditions, the circuit will fail after, for example, a week of operation.
The current can be limited with a series resistor. You do not need a divider, a converter (e.g. 74LVC) just a resistor with all its advantages and disadvantages. Converters are required when signal changes are fast (e.g. SPI) in UART where speeds rarely exceed 1Mb/s a series resistor is sufficient.
I guess you can count what kind and what will be the maximum allowable rate of voltage change?