CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CMOS & TTL

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MCUprogrammer



Joined: 08 Sep 2020
Posts: 221

View user's profile Send private message

CMOS & TTL
PostPosted: Fri Dec 11, 2020 10:53 am     Reply with quote

Hello everbody
What are TTL and CMOS? What does it do to use it as input or output in processors. How to use. Is there a site where I can make choices such as CMOS or TTL when choosing a processor? Thank you.
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Dec 11, 2020 11:21 am     Reply with quote

Best to google a 'general electronics' website....
TTL is based on +5 volt device, CMOS ,up to +15 volt.
CMOS only consumes power when switching 0 > 1, 1>0.

TTL device were/are '7400 series', CMOS '4000 series'.
Sadly I have 1/2 basement full of those..all can be replaced by a PIC.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Fri Dec 11, 2020 11:36 am     Reply with quote

Transistor Transistor Logic & Complementary Metal Oxide Semiconductor.

These were two 'logic' families that came out a long time ago. TTL was first
(there was DTL before this). It has inputs that accept a signal just over 2v
as logic '1' and a signal below 0.8v as '0'. The outputs use standard
transistors so pull up to about 4.4v.
CMOS came latter as a lower power technology. It's outputs pull closer
to the supply rails, and it's '0' level is below about 1v, and the high above
about 3.3v (When running from 5v).
Now the PIC inputs default to using TTL levels, and the outputs are CMOS
types. However some of the PIC inputs use Schmitt inputs. These were
a special type of input designed to reduce the likelyhood of noise causing
problems on inputs. Insteas of the standard input thresholds, the '0'
level is anything below 0.2*supply (so 1v for a 5v PIC). and the high
level is anthing above 0.8*supply (so 4v for the 5v PIC).

Now problems appear, if (for example) you have a device giving TTL
outputs, and try to connect it to a PIC input with Schmitt inputs. Unless
you are very lucky, you may not see a 'high' when required. In this case
a pull up resistor should solve the problem.
The same then applies with 3.3v peripherals and a 5v PIC. The TTL
compatible inputs will work, but Schmitt ones will not see a high
(output voltage 3.3v max, required input 4v....).

The PIC is a CMOS device, it is the built in 'threshold' levels that have
these levels. Look in the data sheet for Vih for the pin concerned.
MCUprogrammer



Joined: 08 Sep 2020
Posts: 221

View user's profile Send private message

PostPosted: Fri Dec 11, 2020 1:02 pm     Reply with quote

So as I understand pins with TTL input:
A little above 2 volts is considered logic '1' and a signal below 0.8 volts as logic '0'.

No processor with CMOS inputs? So there are processors with ST inputs. How to use those with ST inputs. Do they work like CMOS? So when the voltage applied to the input is 4 volts, logic is '1', if it is below 1 volt, logic is '0'. So, when choosing a processor, I should prefer processors with ST input / output. There are millions of integrations. Will I look at all of them one by one? Or is there a way to filter the processor with cmos, ttl, st, etc. input and output?

Also, what should be the reason I prefer these inputs and outputs. This input or output (CMOS, TTL, ST) is chosen according to what. So how should I decide this?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Dec 11, 2020 2:38 pm     Reply with quote

Essentially, you're asking about the 'design' aspects of a 'computer' As such only YOU know what peripherals or input/output sources there will be. I can't tell you that 'A' is better than 'B', or that 'C' is the best choice.
I would like to think most (well, a lot) of programmers here got started with TTL based processors and peripherals. Heck, when I began the UART wasn't a chip, let alone something INSIDE of a microprocessor. It was common to have 5 volt power supplies with 20-30 AMPS....I had one that needed 35 amps...
Today CMOS is used for 'low power' products. It seems most peripherals are now '3 volt' devices so choosing a PIC is important. Either you use a 3 volt PIC or use 'logic level translators' between a 5 volt PIC and 3 volt peripherals.
You also have to consider the 'speed' of the data. The faster the signalling, the faster the PIC has to be AND the better designed PCB, layout, component choices, wiring, etc.
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Sat Dec 12, 2020 3:03 am     Reply with quote

The PIC's inputs are CMOS gates. They just use a slightly lower 'logic 1'
voltage than the default for the original 4000 CMOS series gates. This was
done to ensure compatibility, since a lot of devices offer TTL outputs. When
the first PIC launched, probably something like 90% of the available
peripherals used the TTL levels. If you were designing CMOS circuits and
wanted to connect TTL devices, there were specific gates with lower input
thresholds to allow compatibility. Similar to the PIC inputs.
The levels of each family were purely down to how the circuits were built internally.
No magic 'this is better'.

If you look at the PIC data sheets, _all_ the PIC's have some inputs that
are ST types. Some switch according to what they are doing (so in most
PIC's the logic input to the UART, is Schmitt, even if the same pin uses
TTL levels when not used for the UART).

ST, is 'better' if you have long wires, so a high risk of RF pickup. Otherwise
no advantage, and when interfacing with external devices, possibly these
may have disadvantages.
jaka



Joined: 04 May 2014
Posts: 36
Location: Finland

View user's profile Send private message

PostPosted: Sat Dec 12, 2020 9:17 am     Reply with quote

Also, on newer PIC devices you can select the input levels of each pin separately to ST or TTL. CCS has function set_input_level_x() for this.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group