Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Almost every practical problem today is better solved by something else.

I'm curious about this claim. It's certainly easier to just wire up a modern microcontroller, but is there a better option that involves no software and is likely to still work the same today as it did 50 years ago?



I find it much easier to write a ten line program for an 8 pin CH32V003 (or ATTiny85 in past times) to do exactly the timing or SDC comparisons I want than to figure out the circuit and component values for a 555 or op-amp.

For that matter, a 16 pin CH32V003 can emulate a vast array of 7400 series devices as long as you don't need ns timing — no problem for µs. It's also cheaper.


Using a cpu running software to emulate a handful of gates is just the furthest thing from interesting. It's the inverse of elegant.


Until you go to lay out your circuit board. There's a reason microcontrollers are used for tasks like debouncing switches.


I said uninteresting and inelegant. No one disputes that brute force is functional.


"There's a reason microcontrollers are used for tasks like debouncing switches."

Because people are too cheap (or fail that hard at basic analog electronic control) to get a proper single-pole single-throw switch with a pair of MOSFETs in a monostable mode, or use an S-R flip-flop latch to debounce, or even a very simple R-C filter circuit.

"Throw a microcontroller on it and call it a day" is the surest sign of someone not properly educated in electronic engineering.


I think it's like living under a waterfall.

If you live under a waterfall you'll use 1000 gallons of fresh water pumped at blasting high speed to wash a cup.

We live under a waterfall of cpus and gates in general, and organisms don't care if their environment is perverse. A thoughtless organism will happily consume 1000 units of a free resource just to get 1 unit of some other non-free resource.

And a lot of humans are the worst. Thinking beings who elect not to care about anything like that. Like spammers that operate simply because sending email is free for the sender. They get almost nothing from it, and it costs everyone else a lot, but it costs them even less than the tiny bit they gain, and the external costs don't matter to them the tiniest bit.

But the environment is perverse, created by economies of scale and Asian slave labor and the push for advancement for it's own sake which makes existing useful things artificially low value by being "obsolete".

A software version of that might be making apps with Electron. It doesn't matter how much cpu and ram and disk and general mass of tech stack it takes to make some trivial app. The developers precious time outweighs all other considerations. If they can make the app in a few minutes with no effort instead of a few hours, it doesn't matter how much of everyone else's resources they consume since their time is valuable and 1M other people's cpus are free.


All of that stuff is more expensive and uses more board space.


Which is why my bluetooth keyboard/mouse controller pad has that (specifically resistor/cap circuit under each key) riiiiiiiiiiiiiiight?


While it incurs a programming issue, the microcontroller will generally be more stable, less temperature sensitive, and consume less power.


For other posters saying 'just wire up a microcontroller': please self-reflect on your disregard for the concepts of simplicity & elegance. Never mind robustness, or educational aspects.

'Grab laptop, fire up IDE & plug in programmer cable' vs. 'configure the circuit using a soldering iron'. Both have their place.


Why is no software so important? If you design your board well enough, you can route the programming ports somewhere you can program it in-situ, possible with other components that also need programming.

But in terms of cost, a simple microcontroller is usually cheaper than a 555 nowadays, often doesn't require external components, and so even if all you wanted was a single function like an edge-triggered pulse, or generate a single frequency, it probably still makes sense to use a microcontroller from a board design perspective. As soon as you want anything slightly more complicated, odds are you can replace a ton of other circuitry on the board with that single chip and a small program.


"Why is no software so important?"

Because nothing is faster and more responsive than direct hardware logic.

"a simple microcontroller is usually cheaper than a 555 nowadays, often doesn't require external components,"

Often? Every UC I've ever used has required a whole slew of caps and resistors just to get the thing to take in operative firmware through a programming port. Even the simple light flashers for vehicles that I've made using a UC and accelerometer need at least two caps and two resistors to make a proper circuit that allows for flashing info to the controller.

"so even if all you wanted was a single function like an edge-triggered pulse, or generate a single frequency, it probably still makes sense to use a microcontroller from a board design perspective."

Frequency generation? Inductor, capacitor, input voltage. Zero UC required and guaranteed to be cheaper.

"As soon as you want anything slightly more complicated, odds are you can replace a ton of other circuitry on the board with that single chip and a small program."

And accomplish things at a glacial speed that a basic hardware-only solution would've solved. As an example - BOSS pedals have basically zero latency because it is all analog. All these newer Line 6 and POD and other digital FX pedal makers have horrible latency, some I've measured past 50ms (almost as bad as trying to live-monitor a Windows Audio device.) It has been this way for the over 30 years I've been playing guitar.

Most times, raw hardware with zero software is THE way to go. Anything else is just a performance loss.


> "a simple microcontroller is usually cheaper than a 555 nowadays, often doesn't require external components,"

> Often? Every UC I've ever used has required a whole slew of caps and resistors just to get the thing to take in operative firmware through a programming port.

ATtiny for example. Many others only requiring an external capacitor, and complaining about a decoupling cap on a chip replacing a 555 that also needs an RC network to function seems rather petty.

> And accomplish things at a glacial speed that a basic hardware-only solution would've solved.

Most of these uCs operate at least 1 MHz or higher. The ATtiny85 can run at 8MHz from the internal oscillator and has an interrupt latency of 4-6 cycles. To achieve anything that's replacing something you'd do with a 555, you'd have to try incredibly hard to get latency as bad as you're describing. Perhaps they're actually doing something significantly more complicated than just replacing a 555?


Yes. Look at the old national app notes for the lm339 family of comparators.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: