I'm designing a PCB based on an ATxmega microcontroller (max. 3.6v tolerant). I plan to connect a range of external 3.3v devices. However, I do have a few 5v devices that I want to connect.
There are many designs and ICs for 3.3v <-> 5v bidirectional level convertors already out there. But here's the caveat: I want to allow both 3.3v and 5v voltages on the same pin. So, if the connected device is 5v, the level convertor will kick in and convert the voltage to 3.3v. If the device is already 3.3v, the level convertor does not convert the voltage.
For example, if a 5v device was connected, the circuit would look like this:
|------------| |----------------------------|
| 5v device | <-----> | 5v <-> 3.3v level convert. | <-----> ATxmega pin
|------------| |----------------------------|
If a 3.3v device was connected, the circuit would be connected directly:
|-------------|
| 3.3v device | <-----> ATxmega pin
|-------------|
What circuit will bypass the level convertor when the voltage is already 3.3v, and convert the voltage when a 5v device is connected?
In other words, can I design an automatic-ranging 3.3v<-->3.3v/5v level convertor (without jumpers)?