This question already has an answer here:

Is there an easy way to convert TTL/CMOS output signals to 0 and 5V? For example, if an ic outputs 0.1V as "0", I'd like to convert it to 0V and if it outputs something like 3.9V as "1", I'd like to convert it to +5V. Thanks.


marked as duplicate by Dmitry Grigoryev, PeterJ, JRE, winny, Voltage Spike Jul 5 '17 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 4
    \$\begingroup\$ Not enough detail. What's the load? What's the speed? And why? \$\endgroup\$ – Transistor Jun 29 '17 at 21:31
  • 1
    \$\begingroup\$ How close to 0V and 5V is good enough? \$\endgroup\$ – brhans Jun 29 '17 at 21:38
  • \$\begingroup\$ VTC of an inverter courseware.ee.calpoly.edu/~dbraun/courses/ee307/F02/02_Shelley/… is worth understanding as the general theory applies to all logic gates. As a bonus the VTC is for a 5V gate, readoff 3.9V input as a sample. \$\endgroup\$ – sstobbe Jun 29 '17 at 21:42
  • 1
    \$\begingroup\$ Use a Level Translator such as electronics.stackexchange.com/a/97892/35022 \$\endgroup\$ – MarkU Jun 30 '17 at 0:00
  • 2
    \$\begingroup\$ "Normal" digital logic families are very tolerant with regard to input voltage levels. For example old TTLs will read anything below 0.8V as a low, and anything above 2V as a high. I doubt you'll have any trouble driving an arduino shield directly from a Z80 device. \$\endgroup\$ – brhans Jun 30 '17 at 12:11

Generally a CMOS buffer, or two inverters in series, will do what you ask when powered from a precise reference supply. Anything more than 0.7 Vdd will give you a high output, and anything less than 0.3 Vcc will give you a low. Both will be very close (millivolts) to the supply rails if there is little loading. If you need to accommodate lower inputs you can use something like a voltage translator, an HCT gate or even a CMOS LVDS receiver.

For more current and little voltage drop you can use a CMOS-output MOSFET gate driver- some of them can drive very high currents and have an output resistance in the ohms rather than more like 100 ohms+.

Using a precise 5V reference for the buffer supply and feeding it a 5V-ish digital PWM input can give you a precise analog voltage when filtered.


Not the answer you're looking for? Browse other questions tagged or ask your own question.