Which Gate ICs to buy

Thread Starter

David_Baratheon

Joined Feb 10, 2012
285
Hi everyone

At uni we use something called a "logic trainer" to test combinational digital circuits. Its basicaly 74series logic ICs in big containers with pins that plug into a board. You can plug them in and connect them to switches and LEDs to test various circuits and it also has a few extra features like an LED and decoder.

It costs £1000 and I was going to get one. I realised though, that I can pretty much buy a few gates and switches and get the same functionality for less than a £100 and test my combinational logic circuits on a breadboard instead.

Is there any recommended series of logic gate ICs or equipment for constructing and testing logic circuits at home?
 

tshuck

Joined Oct 18, 2012
3,534
Typical learning IC are the 74 series.... While CMOS devices are more supply voltage tolerant, they are ESD sensitive, so learning with them is harder as you can fry them by simply touching them...
 

Thread Starter

David_Baratheon

Joined Feb 10, 2012
285
is there a kit available that contains a set of ICs and some switches and various others bits or do I just need to get everything individually?

Can you recommend anything specific from somewhere like Farnell as there were over 3000 options for me to choose from unfortunately. Also how could you get switches to be used as digital inputs inconjunction witha breadboard? is there anything particularly practical?
 

tshuck

Joined Oct 18, 2012
3,534
is there a kit available that contains a set of ICs and some switches and various others bits or do I just need to get everything individually?
I typically recommend a kit from Radioshack(the only thing I will from there!), but it doesn't look like radioshack is out where you are...

Can you recommend anything specific from somewhere like Farnell as there were over 3000 options for me to choose from unfortunately.
Let me look...

Also how could you get switches to be used as digital inputs inconjunction witha breadboard? is there anything particularly practical?
With combinational circuits, you needn't worry about switch bounce, so just wiring them up like this is fine...
 

crutschow

Joined Mar 14, 2008
34,427

takao21203

Joined Apr 28, 2012
3,702
Hi everyone

At uni we use something called a "logic trainer" to test combinational digital circuits. Its basicaly 74series logic ICs in big containers with pins that plug into a board. You can plug them in and connect them to switches and LEDs to test various circuits and it also has a few extra features like an LED and decoder.

It costs £1000 and I was going to get one. I realised though, that I can pretty much buy a few gates and switches and get the same functionality for less than a £100 and test my combinational logic circuits on a breadboard instead.

Is there any recommended series of logic gate ICs or equipment for constructing and testing logic circuits at home?
Discrete combinatorial logic is deprecated for quite a long while.

A 1000 pound wow amazing. The kind of circuits you can build with these are quite limited. Think of the original IBM PC- it was crammed with 74xx chips.

Get some PIC 16F59, a bag with LEDs and one with pushbuttons, some displays, and some transistors as well.

You can perfectly do all that logic in software.

You can write regular style, and you can even program the PICs as logic ICs! So you could build circuits having a logic IC with 32 I/O.

It works with some 100 KHz upto into the MHz range depending on complexity. The PIC would behave the same as a logic IC.

The thing is you can reprogram the firmware, the truth tables, and you can change the I/O assignments freely.

Get for instance 25pcs. PIC 16f59. I think a good advice, and I use them myself, among more powerful PICs.

Have a look at the board I built, a 6 digit LCD, a 4bit RICOH real time clock, and soon also a 32 keys pad matrix. The PICs are linked with a 3-wire serial bus. Frequency is 650 KHz only so they can run for a long time from a button cell.

The best LEDs are straw hat 4.8mm- they can give good indication at only 1mA! So you can use 4.7k resistors and save a lot of battery power.

If you only need 50pcs or 100pcs., I can resell straw hat LEDs to you, much faster shipping than from China, and still low price.

I have in the past used 74hc595 shifters but it is so much effort to wire them up if you need more than one. Now I am replacing them with PIC16f59, since it has 32 I/O lines, I can implement nearly 4 chips with one single chip.

it is by the way easy to program a PIC 16f59 as AND, OR, XOR, flip flop, decoder or any kind of these combinatorial designs. It is pretty much straightforward.

It is not the same as using PICs as a microcontroller- you would really make them behave the same as a 74xx logic IC.

Of course you can not drive these with 10 MHz input. Upto 1 MHz is easily archieveable.

So what you need:

25 pcs. 16f59 - about 25 dollar + shipping + tax

PICKIT3 - 30 to 60 dollar depends if you use a clone or the original Microchip programmer. Other programmers are not as good but may work for the 16f59 well enough, so you can save some dollars if you have to

200 pcs. Straw hat LEDs or preferably 1000pcs. bag

1/8W 2.2K, 4.7K and 22K- these cost about $5 for 1000pcs. bags

Some transistors and digital MOSFETs- Farnell has these for good prices. 2n2007, 2n3904 and 2n3906 are standard types.

Displays- you could use character LCDs, LED 7seg, or LED matrix. With a PIC you can easily use multiplexed 4-digit LED displays.

If you want to stick to real 74xx you would see even to output 4 digits HEX is a big effort of wires. It is not really worth it.

If you need high speed also don't use 74XX, but a small CPLD. Altera and XILINX have these, there are low-cost boards on eBay as well.

Remember CPLDs can also implement classic logic.

If you only need low speed, a PIC 16f59 is far more easy to handle and to configure than a CPLD. As these don't have any pheripherals.

You can even go that far and include 2K static RAMs in your PIC circuit.

PICs are also officially intend to replace and to emulate combinatorial logic.

You can clock a PIC in many ways- with a crystal, a canned oscillator, resistor/capacitor, ceramic resonator or even a RF coil. So you need an assortment of such components too.

Wall adapters and DC jacks and 7805 cooling grids are one thing which for sure was useful in the 1970s. Button cells are smart, small, and don't cost much. Perfect for PIC circuits with low-current LEDs. Don't use 20mA LEDs or you will need a wall adapter plus all the hassle that comes with it.
 

Attachments

tshuck

Joined Oct 18, 2012
3,534
PICs are also officially intend to replace and to emulate combinatorial logic.
yeah... I don't think so....


The OP stated he wants combinational logic chips. what's the point in emulating a device if you want to learn the basics of how it works? I think the OP has a good foothold and should move on to digital logic. A microcontroller doesn't afford knowledge of combinational logic, aside from the limited(already implemented) logic the manufacturer affords.
 

takao21203

Joined Apr 28, 2012
3,702
yeah... I don't think so....


The OP stated he wants combinational logic chips. what's the point in emulating a device if you want to learn the basics of how it works? I think the OP has a good foothold and should move on to digital logic. A microcontroller doesn't afford knowledge of combinational logic, aside from the limited(already implemented) logic the manufacturer affords.
Your knowledge about these PICs does not seem upto standard.

1.1 Applications
The PIC16F5X series fits perfectly in applications ranging
from high-speed automotive and appliance motor
control to low-power remote transmitters/receivers,
pointing devices and telecom processors. The Flash
technology makes customizing application programs
(transmitter codes, motor speeds, receiver
frequencies, etc.) extremely fast and convenient. The
small footprint packages, for through hole or surface
mounting, make this microcontroller series perfect for
applications with space limitations. Low-cost, lowpower,
high performance, ease of use and I/O flexibility
make the PIC16F5X series very versatile, even in
areas where no microcontroller use has been
considered before (e.g., timer functions, replacement
of “glue” logic in larger systems, co-processor
applications).


There is also an application note about that. Once programmed in a suitable manner, the PIC will behave exactly as a 74xx logic chip.

What's the point experiencing the fan out and family compatibility problems? It is really a hassle.

What you maybe can not see as a picture is a PIC 16f59, as PDIP if one wanted to, and programmed to have 1x 4 input AND, 2x NOT, 2x 3 input OR, and 1x flip-flop.

It will really behave like that, and you can even fit 4mm sockets on a large board + manufacture a bunch of such cables if you wanted to.

What is so difficult about

Rich (BB code):
while(1){
PORBbitsRB3=(PORTBbits.RB1&&PORTBbits.RB2);}
for a simple AND gate? It is just a line of code. If you need something else, you change the software, not the hardware.

For the purpose of a manually operated experimentation board, you can even simply line up all the statements after one each other- does not matter.

It is perfectly enough to learn everything about combinatorial logic.

If one wanted to learn about the side effects, and phenomena, real 74XX chips are required. But why? Who really wants to build a high-speed circuit with many of these chips nowadays.

So it is sufficient only to learn about the combinatorial logic, and neglect the 74XX specific phenomena.
 

thatoneguy

Joined Feb 19, 2009
6,359
PIC are microcontrollers, without a clock, they don't work.

Cobinational logic gives a valid output within nanoseconds of a valid input, a PIC cannot do that without using one designed in this decade with a CLB on-board.

The 16F59 may be cheap, but is extremely lacking, no I²C, no ADC, no PWM, no Comparators, no UART, little RAM and Flash, no EEPROM, no <insert most useful modules here>, and most importantly, NO INTERRUPTS.

Please stop suggesting the 16F59 unless it is only to make loops for on and off or to emulate a slow logic function like BCD to 7 Segment. It is the ABSOLUTE FURTHEST one can get from a "General Purpose Microcontroller". People starting with them may think that is all they are capable of and give up since it's not worth the time.

Microchip is liberal with samples, and there are a ton of chips better, 16F628, 16F690, and all of the 18F series, which are optimized for C to start with, at the same price!

The OP May wish to play with Logisim on a PC, learn a HDL, perhaps get a CPLD demo board or even a cheap FPGA demo board from Digilent (they make Xilinx Boards), and design the logic in Schematic Capture mode, then test it out on the FPGA or CPLD. The ISE Design Suite is free for those devices and uses, it's only expensive when you need to work with the latest Virtex chips.

Honestly, not much is done with discrete logic ICs these days, either a CPLD, uC, FPGA, or full FPGA + uP + RAM solution is used. For hobbyists, the equivalent is about the smallest FPGA made, or a mid size CPLD, or a microcontroller.

ETA: A PIC CANNOT Do THIS While combinational Logic + Processor block on a $5 FPGA CAN (50Mhz Logic Analyzer). People who use microcontrollers must know the basics of logic, and combinational logic to decide which fits their application better. Microcontrollers (PIC, ATmel, TI) are great for getting into digital circuits quickly and easily, but not capable of quick digital circuits (100Mhz-2Ghz+).
 
Last edited:

tshuck

Joined Oct 18, 2012
3,534
Your knowledge about these PICs does not seem upto standard.
Yes, because PICs were "officially intend to replace and to emulate combinatorial logic".:rolleyes: They were made to be an embedded computer.

1.1 Applications
The PIC16F5X series fits perfectly in applications ranging
from high-speed automotive and appliance motor
control to low-power remote transmitters/receivers,
pointing devices and telecom processors. The Flash
technology makes customizing application programs
(transmitter codes, motor speeds, receiver
frequencies, etc.) extremely fast and convenient. The
small footprint packages, for through hole or surface
mounting, make this microcontroller series perfect for
applications with space limitations. Low-cost, lowpower,
high performance, ease of use and I/O flexibility
make the PIC16F5X series very versatile, even in
areas where no microcontroller use has been
considered before (e.g., timer functions, replacement
of “glue” logic in larger systems, co-processor
applications).
I certainly hope you are aware that the only combinational logic application in there was:
replacement
of “glue” logic in larger systems
the rest are sequential.


There is also an application note about that. Once programmed in a suitable manner, the PIC will behave exactly as a 74xx logic chip.
Will a PIC operate without a clock as the 74XX series does?
No? then it cannot "behave exactly as a 74xx logic chip".

What's the point experiencing the fan out and family compatibility problems? It is really a hassle.
It's called 'learning'.;)

What you maybe can not see as a picture is a PIC 16f59, as PDIP if one wanted to, and programmed to have 1x 4 input AND, 2x NOT, 2x 3 input OR, and 1x flip-flop.

It will really behave like that, and you can even fit 4mm sockets on a large board + manufacture a bunch of such cables if you wanted to.
I can see that. I can also see that these implementations are sequential in nature, NOT combinational!

What is so difficult about

Rich (BB code):
while(1){
PORBbitsRB3=(PORTBbits.RB1&&PORTBbits.RB2);}
for a simple AND gate? It is just a line of code. If you need something else, you change the software, not the hardware.
It is a steep learning curve for a person experienced in digital logic. let alone someone without a sound grounding in the material.

It is perfectly enough to learn everything about combinatorial logic.
You even stated fan out-as a consideration in digital logic is not present in PICs. Make up your mind!

If one wanted to learn about the side effects, and phenomena, real 74XX chips are required. But why? Who really wants to build a high-speed circuit with many of these chips nowadays.
Again, learning.

So it is sufficient only to learn about the combinatorial logic, and neglect the 74XX specific phenomena.
Do you think the PIC doesn't have combinational logic inside? Do you want to know how the processor architecture works? Then you have to learn the idiosyncrasies of digital logic!
 

takao21203

Joined Apr 28, 2012
3,702
thatoneguy: I use this PIC myself and I know their limits.

They can serve for many purpose, such as display driving, keypad matrix, and I/O expansion.

Circuits with PIC 16f59 are only limited by what you can imagine. If you use 5 of them or 8 or 16, you can study parallel computing, and serial bus.

True there are far more powerful PICs. I have PIC32 here and could use these instead. As well 18F and all kinds of 16F.

configuration: more complicated.
external components: Many capacitors needed.
flashing: takes longer.
Documentation: For the 16f5x, it is 52 pages.

tshuck: All what you write is true. Having two 16f59 gives you 64 I/O.
You don't get a nanoseconds response, and internally, it is evaluted sequentially.

For the probable purpose of wiring logic gates together, there will be no difference.

It is just cheaper, and more comfortable.

If you use 74XX, you need countless datasheets to consider as well. you can not get a proper HEX decoder these days even if you wanted to.

I have built a larger circuit with 40xx CMOS, once. That was all about it, and I learned a lot.

Take this CMOS cookbook from Don Lancaster, these PIC 15f59, and be creative. My opinion, upto OP what to do.

Also many 74XX are indeed clocked. Makes a big fun and needs many sheets of paper to implement a bootup sequencer using 40xx logic. For instance I used a 4-bit shifter with a flip-flop to do certain things upon startup. As I said, I learned a lot.
 

tshuck

Joined Oct 18, 2012
3,534
tshuck: All what you write is true. Having two 16f59 gives you 64 I/O.
You don't get a nanoseconds response, and internally, it is evaluted sequentially.

For the probable purpose of wiring logic gates together, there will be no difference.
...and the mismatched clocks of hooking together multiple sequential circuits is dealt with how? Anything outside of a single chip is begging for errors.

It is just cheaper, and more comfortable.
..maybe for you. The OP is just starting out with these things, and is not comfortable with any of it. An XOR gate is scary at that time, let alone trying to figure out how to program a chip with a bunch of wires when you don't know what a datasheet even is!

If you use 74XX, you need countless datasheets to consider as well. you can not get a proper HEX decoder these days even if you wanted to.

I have built a larger circuit with 40xx CMOS, once. That was all about it, and I learned a lot.
Then why are you arguing!?:confused:

Makes a big fun and needs many sheets of paper to implement a bootup sequencer using 40xx logic. For instance I used a 4-bit shifter with a flip-flop to do certain things upon startup. As I said, I learned a lot.
The OP shouldn't be building a boot sequencer form discrete logic, indeed no one these days should. There is a point, after getting the basics, the user realizes the logic, from foundation, can be implemented in a FPGA or CPLD...
 

thatoneguy

Joined Feb 19, 2009
6,359
thatoneguy: I use this PIC myself and I know their limits.

They can serve for many purpose, such as display driving, keypad matrix, and I/O expansion.
Not very well. How is communication set up? There is only one processing core, so if communication is bit banged SPI, I²C, the response time of the instruction being sent to the output changing will be hundreds of microseconds (actually, tens or more MILLISeconds due to lack of interrupts). Chain two in serial and then you have timing errors that simply using a proper PIC (which is all of $0.50 more) wouldn't even have.

When somebody is asking for a microcontroller to Start with, they are often thinking ADC and Serial at LEAST. So suggesting a PIC designed a couple decades ago is only going to result in frustration. Trying to explain to a user that they only need to write 10x as much code to Save 50 cents is ridiculous!

Without learning digital logic, how the microcontroller functions, a user may as well be using a PICAXE or Arduino and be happy with the limitations, since they won't be able to understand beyond that point without essentially starting from the ground up again.
 

crutschow

Joined Mar 14, 2008
34,427
I agree with tshuck. If you want to learn about logic, then using discrete (IC) logic gates gives a better feeling for that then programming some microprocessor to do it. I think it's better to experiment with some logic gates so you understand how logic and sequential circuits work on a basic level before you start programming.

I have nothing against microprocessors as they make it very easy to do complex logic functions with a minimum of parts, but it seems way overkill to buy a microprocessor, buy a programmer, and learn how to program it just to do an AND (or whatever) gate, when you can easily buy the gate. And what about if you want to string together several gates and sequential circuits and see the signals between the various devices. Trying to use a microprocessor for this rather seems like putting the cart before the horse. :rolleyes:
 

takao21203

Joined Apr 28, 2012
3,702
Not very well. How is communication set up? There is only one processing core, so if communication is bit banged SPI, I²C, the response time of the instruction being sent to the output changing will be hundreds of microseconds (actually, tens or more MILLISeconds due to lack of interrupts). Chain two in serial and then you have timing errors that simply using a proper PIC (which is all of $0.50 more) wouldn't even have.

When somebody is asking for a microcontroller to Start with, they are often thinking ADC and Serial at LEAST. So suggesting a PIC designed a couple decades ago is only going to result in frustration. Trying to explain to a user that they only need to write 10x as much code to Save 50 cents is ridiculous!

Without learning digital logic, how the microcontroller functions, a user may as well be using a PICAXE or Arduino and be happy with the limitations, since they won't be able to understand beyond that point without essentially starting from the ground up again.
Yes this can be true. But that is my point, a feature rich dev. board with exactly one chip, and bound by the limitations of it, and the 16f59 on the other hand- use as many as you like.

True there is no serial port which I also would enjoy to use.

There are some clever ways to deal with errors, such as to employ a RDY line and a SEL line as well. You still have to take care of timeout, otherwise the chip will actually lock up. This increases the clocking cycle. Depends on the MCU clock, you can still do a transfer in microseconds. If it is let say 650 KHz only, of course you need some time. You can even (with my protocol) handle an interrupt and after that, clock the next bit. It is a 3 wire bus with a chip select.

Yes nowadays even powerful PICs also start slightly above one $ (TQFP44 at least). But rather $2. And a lot of documentation to browse each time, configuration bits (that is an ease now for me).

What do I want? All I want is an RTC, a keypad, and a 6-digit hex display. I use 3x 16f59 and I don't need any extra components. It is an old 4-bit bus RTC chip, and a 32 keys pad.

For sure there are other ways and means to do this.

What about a small color TFT? Also pretty cool.
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
...and the mismatched clocks of hooking together multiple sequential circuits is dealt with how? Anything outside of a single chip is begging for errors.
For sure this is a problem which needs clever thinking. I use a 3-wire bus, SERDAT, CLK, and RDY, as well a chip select signal.

..maybe for you. The OP is just starting out with these things, and is not comfortable with any of it. An XOR gate is scary at that time, let alone trying to figure out how to program a chip with a bunch of wires when you don't know what a datasheet even is!


Then why are you arguing!?:confused:
We spent weeks in college about all the digital logic stuff (and this means about each topic !!!), while they did withhold microcontroller technology from us until the end- an effervescent complicated looking board actually.

It was a waste of time. I did read this book from Don Lancaster, then built a large circuit with nearly 30 chips, and this took about 2 weeks. I did understand pretty much everything from his book.

If a XOR gate is scary, well then it is not the right topic. Don't assume all people have the logical thinking abilities of a very young girl. If it is explained right, even younger people can understand these topics quickly.

Don Lancaster did not make me memorize all kind of flip flops and their pecularities. He teached me how to design circuits. It was helpful for my programming work as well.

The OP shouldn't be building a boot sequencer form discrete logic, indeed no one these days should. There is a point, after getting the basics, the user realizes the logic, from foundation, can be implemented in a FPGA or CPLD...
Probably not. It was not really something like the stuff found inside Atari 2600 or Amiga (Fiddling with bits and building custom logic in a distinct style).

It was just a little bit more sophisticated. And it worked well as I imagined it on paper.
 

thatoneguy

Joined Feb 19, 2009
6,359
For sure this is a problem which needs clever thinking. I use a 3-wire bus, SERDAT, CLK, and RDY, as well a chip select signal.
I think you are missing the point. When people want a microcontroller, they typically want to REDUCE part count and size of end product. Suggesting to them to use 3 microcontrollers with a mickey mouse undocumented protocol handling inter-controller communication, then trying to get them to program each one separately is... insanity!

This is the digital equivalent of people from third world countries continually show up every month or so trying to make a 12VDC -> 120/220VAC Inverter out of 2 bipolar transistors and a transformer, and complaining it doesn't work. They insist they must make it work because "those are the only parts they can get".

People pay upwards of $100/project when working with Arduino, and you are saying that 3 processors at $0.40 each (plus wasting pins for inter-ic communication that is bit-banged) is "Better" than a single controller with far more functionality for twice the price of the combined cost for 3 separate controllers, when samples are FREE! :rolleyes:
 

tshuck

Joined Oct 18, 2012
3,534
For sure this is a problem which needs clever thinking. I use a 3-wire bus, SERDAT, CLK, and RDY, as well a chip select signal.
So you hobble together a series of serial information, clock and ready lines just to do combinational logic!? Get a CPLD/FPGA and be done.


If a XOR gate is scary, well then it is not the right topic. Don't assume all people have the logical thinking abilities of a very young girl. If it is explained right, even younger people can understand these topics quickly.
So you understood a XOR gate the first time you heard about it?

Don Lancaster did not make me memorize all kind of flip flops and their pecularities. He teached me how to design circuits. It was helpful for my programming work as well.
That is part of designing a circuit-knowing the different trade-offs of a certain device and understanding if another is better suited for the task....

It was just a little bit more sophisticated.
Try primitive...
 
Top