On 26 Nov 2009 at 18:53, Tony Duell wrote:
Then there's the thign that I can wire pins
(and design TTL circuits)
a lot faster than I can write microcontroller firmware. Period. Of
course once I've written the firmware, I can program aas many
microocontrollers as a I want, but this is hardly going to e a
large-volume project.
I think I could wire up the necessary TTL chips in less time that it
would take me to type-in read-written source code, assembly it and
program it into a microcontroller.
The right tool for the task.
Very much so.
Microcontrollers have the advantage that they're inexpensive and take
up little real estate. Similarly, CPLDs and FPGAs can wield a
For one-off projects the overall size of the PCB or stripoard is not that
important.
tremendous bang-for-the-buck. If you don't like
programming
(assembler, C, Verilog or VHDL), that's your preference. I'm
Well, I must admit that 'my favourite language is solder' :-)
constantly being surprised at what someone has done
with a $2
microcontroller and little else. Some of the little microcontrollers
sport speeds that would give me indigestion implementing in SSI TTL
or even ECL.
The problem comes when you want to run external (to the microcontroller)
stuff at those speeds. You then _have_ to design the whole thing as a
high-speed digital circuit, and an awful lot of programmers don't know
how to do that. I've seen the resultant mess all too often...
Yes, it's true that you can do things with SSI or discretes--and I
still do occasionally. But increasingly, I'm using one or more
microcontrollers and/or programmable logic to do what I want--at
least in the digital world. A piece of well-written code can be just
as elegant and satisfying as a good circuit design.
PErhaps it's becuase I think at a very low level al lthe time, but I tend
to cosider the total number of transistors (or gates) as a measure of
complexity/elegance, not the number of individual packages I have to
solder to the PCB.
This does not mean I don't use microcontrollers. Of course I do. In front
of me there's a thing I built that takes in 8 bit parallel data and
outputs a string of pulses (it actually simulates the output of a barcode
reader 'wand' [1]). To do that in TTL would be a lot of chips. But the
comples stuff fits in an 18 pin PIC, there's a little glue logic to
ensure the Cnetronics interface timing is correct under all conditions.
The right tool for the job.
Stiting on top of it is an interface box to link 2 different parallel
ports together. It countains 4 or 5 TTL chips. To do it in a
microcotnroller would IMHO be the wrong thing to do. It would be slower
(although that might not matter) and you'd still keep a couple of the TTL
chips which are just uffers from one port to the other. The result would
be aout the same component count, but more complex, harder to debug, and
piossibly less reliale (my experience is that while a single complex chip
is possibly more reliable than the many chips it could replace, a complex
chip is less relaile than a simple chip. AndI would think a PIC would be
less reliable than the '74 and '00 that it would replace on this board).
[1] Actually to download software from a PC into an HP41. I have a
modified HP82153 wand with an optoisolator wired to the wand output
signal inside the HP41 module. This box connects to the LED side of the
optoisolator, the PC sends data to it, and the HP41 thinks somoody has
run the wand along a line of barcode. And before somebody tells me to get
an HPIL module, I have one, OK...
-tony