Author Topic: CMOS or TTL for "messing" with logic gates  (Read 3832 times)

0 Members and 3 Guests are viewing this topic.

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: gb
CMOS or TTL for "messing" with logic gates
« on: February 20, 2020, 01:52:32 pm »
I want to buy a load of logic gates (simple ANDs, ORs, etc.) so that I can mess about with them to understand their operation and use and how they can combine to perform various functions.

Which should I get, CMOS or TTL?

Obviously, efficiency is not important but they may end-up in an application once I've finished "messing", I suppose.

I understand that CMOS are more vulnerable to static but I've never had a problem with this.

Any advice will be gratefully received, cheers.
You can release yourself but the only way to go is down!
RJD
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19875
  • Country: gb
  • 0999
Re: CMOS or TTL for "messing" with logic gates
« Reply #1 on: February 20, 2020, 02:01:28 pm »
CMOS. The 74HCxx series is ideal. TTL is obsolete and often expensive/difficult to get nowadays.
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #2 on: February 20, 2020, 02:11:21 pm »
Cheers.

This is a bit of a cheek but how many should I get? I want to build latches, flip-flops and so on; maybe some more complex stuff.

I thought about 3 each (with four gates per chip) of: AND, NAND, OR, NOR, XOR and a couple of inverter chips (6 gates).

I know it's hard to say but does this sound about right for starters?
You can release yourself but the only way to go is down!
RJD
 

Offline mcovington

  • Regular Contributor
  • *
  • Posts: 191
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #3 on: February 20, 2020, 02:22:48 pm »
It's going to be a self-education exercise, because very few circuits are actually built with logic gates these days!   Plan the experiments you want to do and get the chips that are used.  Recall that you can make any other gate out of a combination of NOR gates or out of a combination of NAND gates.   Also, you will probably want to experiment with something that has Schmitt-trigger input (for making oscillators and cleaning up input signals) and with some kind of flip-flop.
 

Offline rdl

  • Super Contributor
  • ***
  • Posts: 3667
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #4 on: February 20, 2020, 02:33:46 pm »
 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1596
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #5 on: February 20, 2020, 02:54:53 pm »
4000 series CMOS is a good choice. It's nice and slow, so it behaves itself on a plug-in breadboard, and it isn't fussy about supply voltage: you can use a 9V battery if that's all you have. It still seems to be fairly readily available.
 

Offline Wallace Gasiewicz

  • Super Contributor
  • ***
  • Posts: 1329
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #6 on: February 20, 2020, 03:19:29 pm »
Order a bunch of ANDs, ORs, NORs, NANDs, up down counters and other chips and throw in some OP AMPS. and FlipFlops
Combine the order from the supplier to minimize postage cost. Buy whatever quantity the supplier is packaging (usually 5) Ask for a discount on shipping before you buy, if shipping is included in the price of one order. It costs them the same amount to ship 50 chips as it does to ship 5.
If you need any diodes or resistors or other components you might want to consider ordering them at the same time.
Look around for cheap supplier who has all sorts of ICs so you can order them all at once.
You should find you can get more chips and less total cost even if you end up with some seldom used chips.
This sort of thing is not subject to faulty production as most of these chips are new old stock so don't worry about inferior knock offs.
Probably go with CMOS, if you end up repairing stuff, much of the time you can just stick in a CMOS device into a spot previously occupied by a TTL device.
You are probably looking for through hole devices rather than surface mount so you can easily breadboard them.
Not a lot of stuff built with these chips today but there is a lot of equipment out there that is used by hobbyists that uses these devices and there is a lot of repair going on with old equipment.
Here in the USA I frequently use Thaishine, an ebay source. I am not familiar with your particular shipping and supplier issues.
http://www.ebay.com/usr/thaishine?_trksid=p2053788.m1543.l2754   Look at what they have.
Wally KC9INK
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #7 on: February 20, 2020, 03:34:10 pm »
Certainly CMOS. As mfmax points out, you can run 4000 series up to 15V so no regulation needed. 74HC (not HCT) is specified to run over a 2-6V range too and has more output current capability for driving LEDs etc. (although 4000 goes reasonably high above 9V).

HC74 flip flops are very flexible, obviously plenty of HC00 NANDS, HC04 Inverters (to save pointlessly tying up gates for inversion) too. HC14 Schmitt input inverters will take care of noisy inputs. Maybe some HC138/139 3 to 8 / dual 2-4 line decoders and HC123 dual Monostables. Oh, and a couple of HC86 XOR gates and a few counters HC90/93 async and HC160/161 synchronous. Also HC47 7-Segment decoders if you want to drive displays. Don't forget decoupling caps.
Best Regards, Chris
 
The following users thanked this post: bsodmike

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9931
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #8 on: February 20, 2020, 04:15:51 pm »
I'm going to take a contrarian view.  Old people do that from time to time...

I see two potential goals here:  Learn to play with plastic chips or learn a bit about logic and logic design.  If the goal is to play with a lot of plastic, like maybe Ben Eater's CPU project, rock on.  That's a great learning project.  But it's a project, there's a goal.  Just watching an AND gate work, well, you can pencil whip that and learn just as much.  You can learn about DeMorgan's Theorem and Karnaugh Maps without ever actually seeing a piece of plastic.

The thing is, chip count is limited.  A couple of dozen is a lot and I would think somewhere around 100 is a logistic limit.  At least it was for me when I was doing this stuff with wire-wrap.  So, a hundred chips with 4 gates per chip - about 400 gates equivalent.  When I buy an FPGA, I get a million gate equivalents.  Maybe more!  And I get memory as well as a virtual dumpster full of logic.  Wire-wrap is reduced to typing.  My cut-strip-wrap gun is nowhere near as fast as my keyboard.

If you have any long-range purpose for learning about logic design, start with something that has a future.  In my opinion, FPGA boards with lots of gadgets make sense.  Switches, push-buttons, LEDs, 7-Segment displays, maybe a VGA port, etc.  The gadgets make the board useful.  With that in mind, I like ANY of the Digilent boards and, for the money, this is probably the best thing out there (remember, I want gadgets, bare boards are obviously cheaper): https://store.digilentinc.com/basys-3-artix-7-fpga-trainer-board-recommended-for-introductory-users/

Yes, you can do the beginner AND, OR, XOR stuff usig the switches and LEDs but getting started will be a little bit of a climb.  There's plenty of help around here...  Once you get used to dealing with Xilinx Vivado and programming your first blinking LED (The "Hello World" of the FPGA community), you will be on your way to an education in logic design without all the anguish of actually trying to push little pieces of wire into breadboards.  I've done it and I'm not going to do it again.

While I'm on a tear, I going to put in a word for VHDLwhiz.com.  He tends to use a really cheap Lattice IceStick: https://www.latticesemi.com/icestick
I have a couple of those and they are pretty neat - but slow and kind of small.  Big enough for real projects though.  I have to say, $25 for a development board is fairly cheap.  But it is really short on gadgets and the Lattice toolchain (IceCube2 and Diamond Programmer) isn't anything I would write home about but it works and it's free.

Or just buy an assortment of chips.  It doesn't matter which but I would suspect that 4000 CMOS is easiest to use.  The Ben Eater project uses 74LSxx logic and that stuff is still available.   The thing is, the kit of parts costs a LOT more than a decent FPGA board and, in fact, competes with my preferred board: https://store.digilentinc.com/nexys-a7-fpga-trainer-board-recommended-for-ece-curriculum/

So, a dozen breadboards with hundreds of connections or a couple of thousand lines of code.  And the FPGA board is serially reusable.  In seconds, if the project is already available as a bitmap.

Somebody has to take the contrarian view, so I did.  Either way, have fun!
« Last Edit: February 20, 2020, 05:50:06 pm by rstofer »
 
The following users thanked this post: Gyro, newbrain

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: de
Re: CMOS or TTL for "messing" with logic gates
« Reply #9 on: February 20, 2020, 07:41:39 pm »
4000 series CMOS is a good choice. It's nice and slow, so it behaves itself on a plug-in breadboard, and it isn't fussy about supply voltage: you can use a 9V battery if that's all you have. It still seems to be fairly readily available.

I agree. The 4000-series is very designer friendly (for discrete logic) and is still being used for new designs. You can get surface mount from multiple sources. TI still makes and sells it in DIP form, for less than it cost, adjusting for inflation, in the 1970s.
-John
 

Offline Wimberleytech

  • Super Contributor
  • ***
  • Posts: 1133
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #10 on: February 20, 2020, 08:57:55 pm »
I want to buy a load of logic gates (simple ANDs, ORs, etc.) so that I can mess about with them to understand their operation and use and how they can combine to perform various functions.

Which should I get, CMOS or TTL?

Obviously, efficiency is not important but they may end-up in an application once I've finished "messing", I suppose.

I understand that CMOS are more vulnerable to static but I've never had a problem with this.

Any advice will be gratefully received, cheers.

In a similar vein as what rstofer said...you should download Logisim (http://www.cburch.com/logisim/) and build your circuits there first.  Then when you are ready to see something blinking in the lab, build it with CMOS (yes that is my vote).  I second the motion to get some CD4007s and build logic circuits (and even ANALOG ones) at the transistor level.
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #11 on: February 21, 2020, 01:00:28 pm »
Thank you all for your replies, I really appreciate the time taken.

I have two goals: education and entertainment.

Of course, I want to experiment with the logic and (yes, I've seen the Ben Eater stuff - excellent) make a few circuits both copied (e.g. Ben) and of my own design. However, I'm a bit of a lazy bugger and I've found that if I actually build things I get more enthused to do more. If I just sit at the PC simulating, I get bored.

I guess a "trip" to eBay is called for!

Thank you all again.
You can release yourself but the only way to go is down!
RJD
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #12 on: February 21, 2020, 01:11:05 pm »
I guess a "trip" to eBay is called for!

Nooo! Not unless you luck upon UK suppliers with surplus stock. Frustration lies that way!

Go to CPC, Farnell, and RS and buy the cheapest.
Best Regards, Chris
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13035
Re: CMOS or TTL for "messing" with logic gates
« Reply #13 on: February 21, 2020, 02:09:28 pm »
The *ONE* advantage of bipolar TTL for small scale breadboarding is that you can let the inputs of spare (totally unused) gates float, as they float high well enough to avoid oscillation or excessive power dissipation.  In all other respects, its easy to find a CMOS logic family that  is superior.

If you are serious about experimenting with SSI or MSI logic chips, an Arduino or similar to generate test patterns to drive the inputs programatically, and a Salae Logic 8 clone + the open-source Sigrok logic analyser software to monitor the outputs will be very useful once you get into anything more complex than simple combinatorial logic.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2507
  • Country: gb
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #15 on: February 21, 2020, 04:33:17 pm »
OK thanks, I'll use a proper supplier.

So, with used inputs on CMOS - do they all have to be grounded? This will make a bit of a "rat's nest"?

Another thing I just thought of is are CMOS OK with all the pulling and pushing of breadboard connectors while messing about?
You can release yourself but the only way to go is down!
RJD
 

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: de
Re: CMOS or TTL for "messing" with logic gates
« Reply #16 on: February 21, 2020, 04:54:04 pm »
If you have not already, download a copy of The CMOS Cookbook from the author's website. It is a clear, practical text from which you can learn a lot about digital design, both the how and why.
-John
 

Online nfmax

  • Super Contributor
  • ***
  • Posts: 1596
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #17 on: February 21, 2020, 05:07:49 pm »
OK thanks, I'll use a proper supplier.

So, with used inputs on CMOS - do they all have to be grounded? This will make a bit of a "rat's nest"?

Another thing I just thought of is are CMOS OK with all the pulling and pushing of breadboard connectors while messing about?

Grounded, connected to VDD, or linked to any handy logic signal if the input is a don't care.

4000 CMOS is pretty robust against breadboard pluggery, BUT do include a 10uF electrolytic across the supply rails on the breadboard, as well as a 100nF ceramic, to keep the impedance from VDD to VSS low even when not connected to your power supply.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9931
  • Country: us
Re: CMOS or TTL for "messing" with logic gates
« Reply #18 on: February 21, 2020, 05:14:00 pm »
So, with used inputs on CMOS - do they all have to be grounded? This will make a bit of a "rat's nest"?
The inputs need to be terminated to either rail.  I think it is best to use a resistor and the value isn't particularly important but I would probably use 1k or 2.2k.  Others might say 10k but the higher the value, the more susceptible the input becomes to noise.   I almost certainly would not use 1M.  Others say to just wire it to the rail.  Page 6 here: https://www.ti.com/lit/an/sdya009c/sdya009c.pdf

https://www.electronics-notes.com/articles/digital-embedded-processing/logic-circuits-design/design-guidelines-unused-gate-input-termination.php

Quote
Another thing I just thought of is are CMOS OK with all the pulling and pushing of breadboard connectors while messing about?

Some people have a grounded mat and a grounded wrist strap for this kind of work.  I haven't had a problem in all these years but I can't say I have ever used much 4000 series logic.  But microprocessors are CMOS and I handle those but they tend to have Schottky diodes on the input pins for protection.  With reasonably high humidity and warm temperatures I wouldn't worry about it.  Winter in Minneapolis would be a serious problem.  I visied there twice and it's pretty easy to draw inch long arcs to file cabinets.

https://www.amazon.com/Bertech-Layer-Rubber-Wrist-Grounding/dp/B00O0Q1Z1I

The bigger problem is the reality that breadboards suck.  Once you reach a certain level of complexity (Ben Eater's project, for example) breadboards are darn hard to use.  Wires get dislodged, things that worked a few minutes ago don't, that kind of thing.  I'm not aware of any workable alternative.  BTW, all breadboards are not created equally.  These came highly recommended when I was working on the Ben Eater project: https://www.amazon.com/gp/product/B0040Z4QN8
« Last Edit: February 21, 2020, 10:21:32 pm by rstofer »
 

Offline jfiresto

  • Frequent Contributor
  • **
  • Posts: 871
  • Country: de
Re: CMOS or TTL for "messing" with logic gates
« Reply #19 on: February 21, 2020, 05:40:27 pm »
... Some people have a grounded mat and a grounded wrist strap for this kind of work.  I haven't had a problem in all these years but I can't say I have ever used much 4000 series logic....

I usually wear a wrist strap and use a grounded tip soldering iron. I never lost a 4000 A- or B-series part to ESD, save a couple that were smoked by lightning strikes, which count as acts of God.
-John
 

Offline SmokedComponent

  • Regular Contributor
  • *
  • Posts: 60
  • Country: si
  • Emitting smoke
Re: CMOS or TTL for "messing" with logic gates
« Reply #20 on: February 21, 2020, 07:31:43 pm »
4093 is super useful.
It is one of my favorite jellybean ICs. I always have bunch of these.
They're Schmitt trigger NAND gates, so you can do funky analog stuff with them, too.
Give me enough NAND gates and I'll build you the world.
 
The following users thanked this post: mcovington

Online tautech

  • Super Contributor
  • ***
  • Posts: 29300
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: CMOS or TTL for "messing" with logic gates
« Reply #21 on: February 21, 2020, 08:06:19 pm »
These interactive simulators can be very useful for those getting started with logic IC's:
https://tams.informatik.uni-hamburg.de/applets/hades/webdemos/10-gates/00-gates/chapter.html
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 

Offline Teti

  • Regular Contributor
  • *
  • Posts: 79
  • Country: cz
    • www.martenelectric.cz
Re: CMOS or TTL for "messing" with logic gates
« Reply #22 on: February 22, 2020, 09:59:17 pm »
Another option is to start with discrete NPN and PNP transistors such as BC547, 2N2222, 2N3906. This should give you quite in depth of construction.  :-//
Vintage audio gear connoisseur, computer enthusiast, time-nut, music lover, vintage games gamer, nerd, tinkerer and shady electronic projects maker.
http://www.martenelectric.cz/
 

Offline coldfiremc

  • Regular Contributor
  • *
  • Posts: 75
  • Country: cl
Re: CMOS or TTL for "messing" with logic gates
« Reply #23 on: February 23, 2020, 01:40:28 am »
Use 4000 cmos. There's some assorting kits out there. Cmos has good noise margins, so noise will not make your circuit behave strange (aka protoboard proof). Try to interface to the analog world with comparators, VCO and schmitt triggers. Some CMOS gates also work as analog amplifiers with "funny" connections. You can make it run with clocks using a 555 or using some types of VCO. Cmos gates will run without problems until 1MHz. If you want more, you can increase voltages. Most gates will behave good until 17 V. CMOS 4000 is slow so for anything 5-10Mhz and beyond, consider 74HC, 74LS/ALS, 74F.
If you want SERIOUS fun, consider to buy an EPROM burner and some 61 series SRAMS. You can make microprogrammed state machines with a EPROM, a ROM and a counter and some gates. Also you can read stuff from eproms and make crazy mess with it. You can store data in SRAMS, to then read in some way.
« Last Edit: February 23, 2020, 01:45:19 am by coldfiremc »
 

Offline PerranOakTopic starter

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: gb
Re: CMOS or TTL for "messing" with logic gates
« Reply #24 on: February 28, 2020, 04:45:34 pm »
One last question:

If, say, I'm using a chip with four NAND gates but I only actually need one, do I have to tie the inputs of the unused gates to ground/Vcc?
You can release yourself but the only way to go is down!
RJD
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf