Shop OBEX P1 Docs P2 Docs Learn Events
Discrete Logic vs. µController — Parallax Forums

Discrete Logic vs. µController

Nick McClickNick McClick Posts: 1,003
edited 2009-04-17 16:43 in General Discussion
What's the practical advantage to using Discrete Logic instead of a µController? A few I can think of:
- Price - although if an attiny replaces 3 or 4 discrete logic chips, it seems like a wash
- Switching speed? How many instructions per second would be required to keep up?
- Development time, maybe?

Anything else?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!

Comments

  • VaatiVaati Posts: 712
    edited 2009-04-14 17:10
    Well,·I would think that the time needed to make and operate something made of discrete logic parts would be much less than that of a microcontroller circuit.· With a microcontroller, you have to program it, make sure it works, and by the time you're done, you've used up the amount of time it would take to make three of the same circuit out of discrete logic devices...

    That's what I think separates the two, although I personally prefer microcontrollers.· =)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    3.1415926535897932384....
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2009-04-14 17:12
    Nick McClick,

    Dynamic re-programmability.... what if you got your discrete logic wrong, or simply needed to change it based on the circumstance?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2009-04-14 17:13
    A big one is that if you use standard logic chips those should be easily available and from a large variety of sources. The part is what it is. Micro controllers and other programmable logic has flexibility advantages but they come at a cost. Your part is no longer a generic part. It would then have some sort of custom program involved. That can be a concern years down the road if it needs to be replaced. Is the binary image or source file available to program a new part? Will the programming tools still be available to use? What about any custom programming hardware tools? Parallax has been great in supporting their products but it can be a big issue on some programmable devices and other micro controllers.

    I am in the middle of an issue like this working to restore an odd 24 year old CPM system which used quite a few custom PLD devices and unfortunately the data to recreate them has been long lost. If regular logic has been used it wouldn't be a problem. Of course the chip count would be higher so there is a downside to that method too.

    Robert
  • Nick McClickNick McClick Posts: 1,003
    edited 2009-04-14 17:19
    Me, get something wrong? Ha!

    No, I'm pro-µController, I'm just wondering if there's any need to stock some of the discrete logic chips I carry, or if their function can be emulated with a µController.

    Re: development time - makes sense if you're trying to compress several logic chips into a single IC, but what if you're just doing a drop-in replacement for a decade counter?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-04-14 17:38
    There's no pat answer to this, as every design situation presents different opportunities and constraints.

    I frequently employ the ATTiny13 in circuits that require few I/Os and a lot of "smarts". At less than a dollar each in quantity, it can be a good choice. For example, I'm currently working on a simple board that interfaces to a BASIC Stamp. It wouldn't necessarily have needed a microcontroller, but including one enabled the interface to be serial, connected by a three-pin servo cable. Without the micro, A six-pin cable and a more expensive sensor chip would've been necessary. By the time you figure the extra cost for connectors and cabling, the ATTiny looks like a bargain. Moreover, I can add functionality that would have been impossible without it. Plus, it's much easier to program in-circuit than a PIC. (I use a MoBoStamp-pe and a short cable with an 8-pin SOIC clip at the end.) Finally, if you need an ADC, the ATTiny, with it's own multiplexed 10-bit ADC, is cheaper than most dedicated units. (The architecture takes some getting used to, though.)

    But if you need fast logic with lots of I/Os, 74HC discrete devices are the better choice. Typical circuits will include 75HC595s and/or 74HC164s for I/O expansion. I also make use of single- and dual-gate 74LVC devices in SOT23-5 and -6 packages. These are handy for localized logic functions and are small enough to be placed where they're needed.

    Now that the Propeller's price has been cut, it's also a real value proposition for replacing high-functioning logic and peripheral devices. With 28 usable I/Os and a small footprint, it can replace an entire boardful of stuff, reducing the overall size and cost. I would argue (and have demonstrated) that the Prop can easily fill in for dedicated peripheral chips at a reduced cost and with enhanced flexibility.

    -Phil
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-14 18:09
    I have done projects entirely in logic circuits and it gets expensive quick. mistakes are easy and hard to fix. since I found micro I will never do again. I use discrete logic now as glue chips only now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • Nick McClickNick McClick Posts: 1,003
    edited 2009-04-14 18:40
    I think I have my answer;

    The high speed discrete logic chips have advantages, but there aren't a lot of DIP versions of those chips, so it's a moot point.

    Cheapo ucontrollers work fine for most applications.

    Everything is a trade off, but I prefer to it make it easier for the builder and to stock less components.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-04-14 19:08
    In general, I use discretes when micros would be too slow; micros when the required function is complex enough to make discretes uneconomic; and whichever is easiest, or cheapest, when either will do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • TeslaTesla Posts: 55
    edited 2009-04-16 00:43
    Phil Pilgrim (PhiPi) said...
    br>Now that the Propeller's price has been cut, it's also a real value proposition for replacing high-functioning logic and peripheral devices. With 28 usable I/Os and a small footprint, it can replace an entire boardful of stuff, reducing the overall size and cost. I would argue (and have demonstrated) that the Prop can easily fill in for dedicated peripheral chips at a reduced cost and with enhanced flexibility.

    -Phil

    Yea with 8$ a chip that is only a dollar a core. Cant go wrong there. Unless you need it to have dedicated ADC.
  • mctriviamctrivia Posts: 3,772
    edited 2009-04-16 01:30
    prop can do ad with only 2 caps and 2 resistor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
  • NetHogNetHog Posts: 104
    edited 2009-04-17 16:43
    Carl Hayes said...
    In general, I use discretes when micros would be too slow; micros when the required function is complex enough to make discretes uneconomic; and whichever is easiest, or cheapest, when either will do.

    Agreed! Either performance, or functionality.

    The steady hands game I did (photo's should be in completed projects) had one descrete chip acting as a latch as the·BS2 does not have one. It was cheep enough to dig through my 'surplus' draw and find something that worked. This is stocked by a grab-bag of surplus logic parts.

    I wouldn't use a micro-controller·if all I needed was·a J-K flip-flop for example, but could emulate one·if I'm comitted to·using a micro-controller that has edge-triggering. A recent project I put together,·I added a couple of latches to extend·number of·output bits·(grab-bag material) and a·64K RAM (grab-bag material) combined with an SX28.·I·then looked at the most optimal way of putting all these together·without eagerly adding additional chips.
    ·
Sign In or Register to comment.