What to use for simple custom ttl logic in prototyping - Page 1
Forum section: electronics / beginners

author: Sigmoid
author_rank: Frequent Contributor
timestamp: July 11, 2016, 05:15:50 pm
content: So I need to implement some simple (3-4 variable) ttl logic functions. I don't have a microcontroller and don't intend to add one, and using discrete nand gates eat board space like it's happy hour...What would you consider the best way to approach this in a home lab setting - looking at optimizing board space and boilerplate, part cost, tooling cost..? Eprom? Pla?

author: ataradov
author_rank: Super Contributor
timestamp: July 11, 2016, 06:05:21 pm
content: Realistically, CPLD is the only real true logic solution. But for price and package availability, MCUs will win. Whatever your solution is, it will require programming, so why not a small MCU? The only concern is propagation delay, which can be significant with MCUs.

author: Ian.M
author_rank: Super Contributor
timestamp: July 11, 2016, 06:58:37 pm
content: Microchip have various Enhanced Midrange PICs with four configurable logic cells that can implement many logic functions of up to four variables in dedicated hardware. (e.g. the 14 pinPIC16F1415)You do have to write code to set them up, but they then operate unattended. Assuming you aren't implementing any logic in code, the CLCs on their own are far less flexible than a CPLD or even a small PAL, but on the other hand, the toolchain cost is minimal.

author: timb
author_rank: Super Contributor
timestamp: July 11, 2016, 07:06:05 pm
content: I use a PSoC 5LP for this very thing. It's a Cortex M4 plus, what I'd consider to be between a CPLD and an FPGA. The PSoC Creator software has a schematic editor that lets you drag and drop various logic elements (AND, OR, NOR, NOT, XOR, XNOR, D Flip Flop, SR Flip Flop, etc.) plus LUTs, communication blocks, clocks, clock dividers and various other digital functions. You can also program the logic fabric in Verilog!There's also a rather nice configurable analog block, with full on chip analog routing and muxing (any pin can be used for any function, analog or digital). This includes a 20-bit DelSig ADC, dual 12-bit high speed SAR ADC, quad 8-bit high speed DAC, and a four halfway decent op-amps. There's also a fully configurable switched capacitor block that provides extra comparators, sample and holds and more.Anyway, this is all wired and setup on a familiar schematic editor, all drag and drop, super easy to use. The software also includes a very nice IDE for writing/compiling/debugging the CM4.I use the $10 PSoC 5LP kit, which includes the programmer dongle. It's a very good deal! I basically use it in place of discrete logic for prototyping.

author: rstofer
author_rank: Super Contributor
timestamp: July 11, 2016, 07:13:31 pm
content: A parallel EEPROM?http://www.atmel.com/Images/doc0007.pdfYou would have to set up a scheme for programming the device but an Arduino might be able to do it. I don't know if the Arduino can accommodate the number of lines required. In the bad old days, I used blown-link PROMs and I built a little manual programmer. I'll bet I could come up with a way to program the EPROM. Even if I had to use switches and buttons. Or maybe the Arduino just pulses the WE just to get the proper width.

author: magetoo
author_rank: Frequent Contributor
timestamp: July 11, 2016, 09:41:44 pm
content: Those tiny Silego GreenPAK parts perhaps. A "tiny FPGA" (a dozen LUTs) plus some analog blocks. The downside is the microscopic QFN packages, but if space is an issue it might be an option. They look really neat, I wish someone would make breakout boards for them.For large packages, there are also still PALs/GALs being made. TI has a few PALs still, and Atmel has their GALs that are probably really CPLDs in disguise.CPLDs have already been mentioned and are probably the way to go.

author: edavid
author_rank: Super Contributor
timestamp: July 11, 2016, 10:33:47 pm
content: Quote from: Sigmoid on July 11, 2016, 05:15:50 pmYou don't say how many functions you need, but of course you can implement any 4 variable function with an 8:1 mux and possibly an inverter. No programming required!

author: Sigmoid
author_rank: Frequent Contributor
timestamp: July 12, 2016, 10:46:27 pm
content: Thanks for the tips. I don't want to add MCUs to an otherwise MCUless project because of noise, delay and boilerplate. PLDs are an attractive solution, but I'll need a programmer for those. (Ohwell, I already wanted an eprom writer for some time.)And thanks for the tip on muxers, I completely forgot about that route.Should be good enough for a proof of concept.

author: ebclr
author_rank: Super Contributor
timestamp: July 12, 2016, 11:16:29 pm
content: With some diodes and resistors and a transistor you can make any port you want

author: timb
author_rank: Super Contributor
timestamp: July 13, 2016, 12:20:36 am
content: Quote from: Sigmoid on July 12, 2016, 10:46:27 pmWith a PSoC, the MCU bit is separate from the programmable logic bit. There is no boilerplate code to write, no noise, no delay, no complexity.You just drag the logic functions you want onto the schematic sheet, wire them up and hit the program button. It generates all the code, sets up the clocks, synthesizes everything and programs it! In fact, if you don't use any of the MCU functions, the MCU never even starts up!It even comes in a breadboard friendly DIP form factor... For $10... Which even includes the programmer (it snaps off the main board if you want it separate). I've got drawers full of pretty much every 74xx and 4000 ever made that I never use anymore, because it's so much easier to just use the PSoC.I seriously don't know why anyone would mess with discrete logic or EEPROMs or muxes or PALs for prototyping when we have stuff like the PSoC (and CPLDs and FPGAs). (Aside from people building retro computers with vintage components, or repairing vintage equipment; that I understand. But for modern prototyping? Forgetsboutit!)Seriously. $10!Edit: Though, if you really don't want to use something like the PSoC, then have a look into the "Configurable Logic Blocks" from TI:http://www.ti.com/lit/ds/symlink/sn74lvc1g97.pdfA single SOT-23 part can be setup as a MUX, AND, OR, NAND, NOR, NOT and a buffer!I keep a handful around, soldered to SOT-23 to DIP adapters. It was my go to prototyping solution before the PSoC.

author: Sigmoid
author_rank: Frequent Contributor
timestamp: July 15, 2016, 10:20:20 pm
content: These do seem awesome, I'll give you that.I'll definitely look into them.Btw, if we're talking jtag programmable cpld families, is there a clear winner when optimizing for price and size (and free developer software)?