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.
-
4Not enough detail. What's the load? What's the speed? And why? – Transistor Jun 29 '17 at 21:31
-
1How close to 0V and 5V is good enough? – brhans Jun 29 '17 at 21:38
-
VTC of an inverter https://courseware.ee.calpoly.edu/~dbraun/courses/ee307/F02/02_Shelley/Section2_BasilShelley.htm 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. – sstobbe Jun 29 '17 at 21:42
-
The 0.1V is normally low enough to be detected as LOW by the other side. Why need to convert it to 0V? Just a very general answer, like your general question: you can use a comparator for the 3.9V to 5V conversion. – nickagian Jun 29 '17 at 21:43
-
1Use a **Level Translator** such as https://electronics.stackexchange.com/a/97892/35022 – MarkU Jun 30 '17 at 00:00
-
First of all, excuse my newbness ;-) what I'm trying to do is generating PWM from a Z80 with a Z80CTC and a Z80PIO and use arduino shields with them (disregard questions about the other arduino shield pins, I'm just interested in the pwm issue). From what I understand (maybe wrongly), the arduino PWM pins output 0 or +5V. My concern is that if I generate PWM between let's say 0.20V and 3.90V, whatever connected on this pin may not work as intended, or will it? – MrSharp Jun 30 '17 at 01:53
-
2"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. – brhans Jun 30 '17 at 12:11
1 Answers
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.

- 376,485
- 21
- 320
- 842