How does a hex level shifter works

level-shifting

My LCD screen operational pins are driven by 5V whereas my STM32 MCU outputs 3.3V maximum.

I would like to shift 3.3V to 5V for about 6 pins. I could use opamps to amplify the input, but in my opinion that would energy, space and cost inefficient.

I have came across level shifter ICs and they seem to do exactly what I need.

Specifically, I got hold of MC14504BCP Hex levelshifters which seem to be more advanced than I need.
I don't have much experience with electronics and I have never used them before. I would really appreciate if anyone could help me to understand how they work.

Datasheet: http://www.onsemi.com/pub_link/Collateral/MC14504B-D.PDF

Best Answer

The datasheet is very sparse, but all the information you need is plainly on it.

Block

What you see here is a internal description of how it works, and the Mode Select pin. This is a 6 input to 6 output level shifter. It is not bi-directional, and you can only translate from one level to the other, no mixing and matching. The diagram shows that an input goes into the inverter (not gate), powered by VCC. It is then shifted before going into another inverter, powered by VDD, resulting in the output.

From this you can see that Vcc is the Voltage Supply for the Input level, and VDD is the Voltage Supply for the Output level.

The Mode select table tells you how the Mode pin should be handled. The TTL and Cmos does not refer to simply voltage levels, but how to interpret them.

And the Electrical Characteristics tell you the rest.

enter image description here

Here you can see what voltage, comparatively, will be interpreted. Cmos treats a Low and a High roughly equally. A Input Low (0) is treated as a little under half of the Voltage Supply level (Vcc), and a Input High (1) is treated as a little over half of the Vcc (When VCC = 5, anything under 1.5V, then up to 2.25v is logic 0, anything above 3.5V, then until 2.75V is logic 1).

TTL on the other hand, has a smaller, fixed range for logic low. An input (at VCC = 5v) between 1.5 and below is Logic 0, and 1.5 and above is Logic 1.

You need to look at the STM32's datasheet to figure out if it uses TTL or cmos level output.

Related Topic