EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: texane on November 14, 2009, 01:42:03 pm

Title: [ ttl output to cmos input ]
Post by: texane on November 14, 2009, 01:42:03 pm
Hi,

I am to interface an old TTL based device with
the PIC18f. The device has roughly 20 pins coming
from TTL based gates I have to read at a given time.

I did not know, but reading the PIC18f specs, some
of the GPIOs are CMOS Schmitt trigger input buffer in
digital IO mode. So I guess I have to translate the level,
from TTL to CMOS, because the TTL level may be too
low for the CMOS Schmitt trigger to switch correctly, I
am right?

In that case, do you know about a chip doing so?

Cheers,

Fabien.
Title: Re: [ ttl output to cmos input ]
Post by: jimmc on November 14, 2009, 03:50:02 pm
A pull-up resistor from the TTL output to VCC will ensure that VOH is CMOS compatible.
Value is not critical, say 4k7 lower for high speed operation. Minimum value is set by IOL max of TTL device.
For ultimate speed use 74ACT series device (eg 74ACT04 hex inverter) as a level shifter, the ACT series has TTL compatible input thresholds.

Jim
Title: Re: [ ttl output to cmos input ]
Post by: texane on November 14, 2009, 05:52:58 pm
Hi,

Thanks for replying. I do not really care about
speed in this application. I did see the trick of
adding a pullup resistor, but I do not understand
it... I understand what a pullup resistor is I mean,
but could you explain why it raises the voltage
in this case? I mean 2 voltages from differents
nodes do not add...

Thanks for helping,

Fabien.
Title: Re: [ ttl output to cmos input ]
Post by: septer012 on November 14, 2009, 06:06:20 pm
Maybe you need something like this?!

http://www.sparkfun.com/commerce/product_info.php?products_id=8745

I used one for a 3.3v GPS to 5v PIC/Shmidt Trigger Input
Title: Re: [ ttl output to cmos input ]
Post by: texane on November 14, 2009, 07:07:05 pm
Thanks, I will have a look. At a first glance
it seems a bit undersized since I would need
at least 6 pins, thus an octal buffer converter.

Cheers,

fabien.
Title: Re: [ ttl output to cmos input ]
Post by: jimmc on November 14, 2009, 07:09:49 pm
The standard TTL output stage is the 'Totem pole' shown here:
http://www.siliconfareast.com/ttl.htm as you can see that, on its own, the output cannot rise above 2 diode drops below VCC.
Adding the pull-up resistor enables the output to rise to VCC when the lower transistor (T4) is off.
Under these conditions the diode is reverse biased and T3 has no effect.
If you're not interested in speed the a higher value resistor may be used for the pull-up, it only has to overcome leakage in the TTL output stage, 22k will still give 4v with almost 50uA of leakage.

I am assuming that you are running the PIC from the 5v, the TTL only operates at 5v.

A quick Google on 'TTL to CMOS' gives this as one of the top results:
http://www.fairchildsemi.com/an/AN/AN-314.pdf

Jim