Simple 5V to 3.3V level shifter

If you need to interface a 3.3V logic unit to a 5V logic CPU board you may be tempted to use the traditional two resistor voltage divider. This will work, however there is an alternative solution that uses one 1N4148 (or similar) diode. When the 5V output (right side) is high, the diode blocks but the 3.3V input is still pulled up by an internal pull up. When the 5V output (right side) is low, the diode conducts and pulls down the input on the left side: 3V input –>|– 5v “output”
The illustration is snipped from stackexchange.com