On Feb 27, 2008, at 6:11 PM, Tony Duell wrote:
Well, Chuck
said it best, but I'll add this: You get fewer
components, lower cost, easier maintainability and tweakability,
increased flexibility, the possibility for a reusable design...how is
this a bad thing?
OK, let's look at those advantages :
'Fewer COmpoentns'. OK, I'll grant that there are probably few bits to
pick up and solder to the PCB (although it's close -- as I
mentioned last
night, there's a CUTS decoder using a single 16 pin TTL chip). But
there
are certainly more 'devices' -- individual transistors, etc -- in the
microcontrolelr solution. Now, my expoerience suggests that while a
single chip is moree reliable than making the same circuit from many
chips or discrete transistors, a complex chip _is_ less reliale than a
simple one. So while trying to build the 'microcontroller' solution
using
TTL (full adders, lateches for the registers, etc) would be
considerably
less reliuable than the single chip microcontroller, I also suspect
that
a single TTL chip, or a few of them, would be more reliable than the
microcontorller
I can't really disagree with your assertion that a complex chip is
less reliable than a simple one, but we're talking about very simple
microcontrollers (granted they're a lot more complex than a 7473 or
something) that just don't fail all that often. I don't know of
anyone who has experienced high field failure rates with these little
chips. I guess, to me, it really doesn't matter if it lasts 100
years or 1000 years.
'Lower cost'. I could make the flipant answer
and say that my junk box
contains plenty of TTL chips and no microocntrollers. But I'd rather
point out that the cheapest solution is not necessarily the best, and
that this idea of always cutting the cost to the minimum is one reason
that I don't buy many new products.
We're in agreement there, as I live in the country that is now
ruled by WalMart and all of their made-in-China garbage and it's
really getting to me. I would never suggest that the cheaper
solution is automatically going to be better. However, this (in my
opinion) better solution also happens to be cheaper.
'Easier maintainabilty and tweakaility'.
Surely you jest here!
Not at all. Read on and I will explain my position.
It is a
lot easier to find a fault in a circuit when you can actually put the
'scope probe on a particular signal. Darn it, with a single-chip
microcontroller, you can't normally trace the firmware.
In the context of a small microcontroller like the ones we're
talking about, these things just don't have that much code space.
Almost none of them allow self-modifying code. Nearly all of them
have small, simple instruction sets. If the programmer NEEDS to
actually trace the firmware to find a bug, I'd question that
programmer's competency. Seriously.
Repairing it is a
nightmare unless you have the firmware (prefereably as source code).
Of course we'd have the source code. We're talking about one of
us building something.
I'd
much rather change a 2-lead passive compoennt than reprogram a chip
(and
it'll be quicker...)
Well, personal preferences aside, it might be quicker and it might
not. I can type "make burn" at a shell prompt in the terminal window
to the right of this email message and squirt an entire new code
image into the Philips ARM7 chip I'm working with in less time than
it takes my (fast Metcal) soldering iron to heat up...and that code
image has BIG stuff in it like an IP stack.
'Increased fleximbility'. The original
discussion was to decode
cassette
tones. Why do I want to add any more features. I prefer a design that
does one job, and does it well.
Of course. You seem to have assumed that you're more anal and
more of a purist than I am, but I assure you that's not the case.
I've lost jobs (and very nearly my HOME) for taking a stand on such
matters in the past! So, in the context of decoding cassette
tones...There are all sorts of perfectly valid reasons why that
additional flexibility might be useful. What if you want to change
it to use different frequencies later? What if you want to
experiment with noise-resiliency algorithms or something? All of
these things can contribute to "doing one job well". Witness Phil's
floppy disk reader project.
'Reuseable Design'. Again 'Why?'.
I'd much rather come up with the
_right_ design (IMHO) for each problem eather than try to kludge in a
previous design just ecause I have it.
Reuse of a past design is not automatically a kludge. Reuse of a
*debugged* past design, if it's the right tool for the job, is
SMART. Period.
This quickly leads to the idea of
bodging together off-the-shelf units, which is another thing I
dislike...
...and I dislike it as well, and I'd never do it. Not everyone
who uses a microcontroller is boding together off-the-shelf units or
adding unnecessary complexity. Make no mistake my friend, some of us
microcontroller hackers are just as idealistic and picky as you are,
and our standards are just as high.
-Dave
--
Dave McGuire
Port Charlotte, FL