Logic equivalent in electronic

Sep 27, 2006 17 Replies

HI,



I am trying to find if there is an equivalent in electronic (most probably digital) for some common programming language. What would be the equivalent of 'if - then' , 'else' etc... I am builing a digial circuits with inverters , Nand gates etc.. but would like to implement more complex decision. I did not find anything on google, does anybody know about these pre-made circuitry?



thank you



ken



If...else is trivial:

(view with fixed-width font)

if -------+-------------- then | | |\\ | | \\ +--| >O------- else | / |/

If you want to learn how to do logic which depends on past as well as present input (logic with memory) do a search on "sequential logic". You'll learn about flip-flops, clocks, counters...

Tim

--- In order to implement the statement: "If 'W', then 'O' = 'X', else 'O' = 'Y' you could do this: (view in Courier)

W>-----+-------A | NAND Y--+ X>-----|-------B | | +--A [INV] NAND Y--->O | +--B +-------A | NAND Y--+ Y>-------------B

---

--- How do you mean "pre-made?"

-- John Fields Professional Circuit Designer

Hi, Ken. There definitely is a digital equivalent. You could do worse than starting with Wikipedia:

formatting link
formatting link
formatting link

But try to remember that they invented computers to get away from this. Re-inventing the wheel may be helpful to learn how the wheel is made, but after that, just get a wheel.

Cheers Chris

Hi, Ken. There definitely is a digital equivalent. You could do worse than starting with Wikipedia:

formatting link
formatting link
formatting link

But try to remember that they invented computers to get away from this. Re-inventing the wheel may be helpful to learn how the wheel is made, but after that, just get a wheel.

Cheers Chris

Thanks a lot, no I have something to start with . I just meant by pre-made that maybe there is a chip that would include al those NAND and inverters.

Ken

Hi all,

I'm a "newbie" too...at least in the advanced world of digital. But wouldn't PLC's be what the OP is refering to when he inquires about a chip with "all those" gates? 'Sorry if I don't sound like I know what I'm talking about, but I'm still trying to figure it out myself.

Regards,

Scott

To see how complex this topic is and the number of devices that are available to perform programmable logic look at this chart.

formatting link

Below Source

formatting link

A programmable logic device (PLD, also referred to as a PAL, PLA, CPLD or FPGA among others) is essentially a collection of general purpose digital circuitry and interconnection resources. The design process for a PLD results in a specification of how those resources are configured and connected together to implement the desired circuit. Rather than select different components and physically connect them to get the desired circuit behavior, the engineer can add a PLD to the circuit and implement all the required logic circuitry in the PLD with greater ease and flexibility.

Applications

The spectrum of programmable logic parts runs from simple 16 pin PALs suitable for replacing a few logic gates to multi-million gate, thousand pin FPGAs capable of implementing complex data processing functions or special purpose microprocessors.

A typical small application might be to replace several logic gates spread among a few chips in a design with a single chip programmed to perform the same functions. These include address decoding, glue logic or simple signal generators. More involved circuits might include sequence controllers, state machines etc.

Large applications may include interface control blocks (e.g. PCI bus, DVI), arithmetic processing or other data processing. Microcontrollers can also be included in FPGAs which, with the addition of controlling software, can result in complete, highly specialized designs in a single chip. FPGAs are also used to prototype microcontrollers, microprocessors and other designs intended for implementation in ASICs.

GALs ( generic array logic ).

Graham

Programmable logic controllers go a bit further still.

Graham

And now GALs of course. Same concept different implementation.

I came across an interesting use of FPGAs online which is to implement a VGA controller. Whilst such a thing is of little interest to the PC community anymore it continues to be of interest to those ppl designing embedded electronics and since the usual chipsets vanshed a 'replacement' was needed.

See also.

formatting link
formatting link

Graham

The OP might want to consider getting a nice FPGA board with get started using VHDL or Verilog. I suspect from the OP's comments and replies that this is the probable direction being pointed out.

Jon

Jon,

When you say a "nice FPGA board," what would you suggest? Is there a typical, low cost trainer available? Also, is there a specific VHDL that one would use?

Scott

Leslie,

Thanks for the link. Wow! Pretty big picture for devices. I'm reviewing (auditing) my digital stuff right now, and hopefully moving on to FPGA's, etc... That site has been helpful in my understanding of the bigger picture.

Scott

--- In the example above, you probably already know that an inverter can be made from a NAND by connecting its inputs together, so if you used all NANDs to construct the circuit (which is called a '2 to 1 multiplexer') it would look like this:

W>--+------------A | NAND Y--+ X>--|------------B | | | +---A +--A | NAND Y--+ NAND Y--->O +---B | +--B | | +--A | AND Y--+ Y>---------------B

There are several chips available which contain four dual-input NAND gates, in both bipolar and CMOS construction and in the 74XX and

4000 families of logic devices.

A good site to peruse would be:

formatting link

and data sheets to download would be:

formatting link

formatting link

formatting link

As others have mentioned there are also available chips designed as arrays of uncommitted logic gates which can be programmed to yield pretty much any logical function(s) you could want, but I noticed that no one mentioned a Programmable Read Only Memory, in any of its various flavors. Google "PROM" or "EPROM" and also the acronyms earlier presented for some interesting reading. (If you like logic :-))

-- John Fields Professional Circuit Designer

It's covered in one of the wikipedia links I posted.

Graham

Actually, there are a lot of such excellent options, I would leave that up to the OP. But I purchased a small board from Xilinx as my first case, the XESS proto board. It included an XC4010XL. I definitely paid less than $100 for it, but I don't remember the exact amount now. Because I've put more time into using Xilinx parts and didn't run up against problems, that's the way I'd go for another board or my first board, if I did it again. But I am also impressed by BurchED in Australia and I'd have no problem buying their products.

I used the software that Xilinx provided. It was just before their web based tools, so I got a full functioning toolkit without any need of web access to use. Not sure what those circumstances would be now. Nor do I know much about what is considered the better VHDL to learn from and about. I would like to hear opinions about that.

Speaking of which, I prefer VHDL over verilog. I've learned some of both and at my stage of learning and with my software background, VHDL is a clear winner in terms of readability for me and I'm not aware of there being a downside to it.

Jon

So what? My point was that no one mentioned it, and no one did. Had they, they would have called it out by name as I did.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required