Many threads end up with a recommendation of "Use a uC". When all you have is a uC, everything starts looking like a nail with a "$1 uC hammer". I've seen many LED circuits built with a uC when $0.20 logic ICs fit the application better, uC's are often used because of the internal clock for delays.
That being said, most replies will STILL involve a microcontroller solution, and here is the reason:
People just starting in electronics want to do some VERY advanced projects. Compared to what was commonly available 20 years ago and 'just starting', what somebody new to electronics can DIY is nothing short of amazing. This is where uC's often find a home, doing jobs they sometimes aren't optimal, but are easy to use and ge the job done. They frequently play the role of steady state machine, where CPLD/FPGA is better suited, but not easier to implement.
uCs vs Discrete Logic:
The downside of microcontrollers or logic arrays is found when you dig out a widget you made a few years ago, then do something that lets the magic smoke out, the exact code isn't usually still in your mind, rarely still on the hard drive. Whereas 74xx and 4xxx series Logic ICs are easily replaced by numbers.
Why not state machines?
I'd guess about half or more of the projects I've seen microcontrollers used for are simple state machines, without the need for "actual processing". FPGA is quickly becoming the leader in consumer products due to programming being as simple to program/reprogram (hardware wise) as an AVR, with the availability of up to hundreds of I/O. The downside: Steep learning curve, not breadboard friendly due to pin count, and expense. Development tools and the 'chips' themselves are not in the uC price range (The development software and hardware easily hit 3 and 4 digit costs). In addition, "discrete logic" needs to be understood very well to have a working, efficient solution. FPGA's do not have "instruction sets", they are simply huge arrays of "blank gates" that can be configured to do a huge variety of tasks, from a grey-code to 7 segment decoder to PONG with VGA output.
What about Basic Stamps, Why do all schools have them if they aren't used?
For the price of a Basic Stamp ][, you can get the complete PIC starter set, and a license for BoostC or BoostBasic.
Speed- 40,000 basic instructions per second for BS ][, 4 Million instructions per second with a native PIC. Most of the time lag is token fetch/decode/load/run from EEPROM in the BS ][.
As for schools: They are re-usable and very easy to use, they also get huge discounts from the company that makes them.
"Stamps" are very easy to use on a breadboard, program and reprogram while learning about microcontrollers.
Basic Stamp Problem: You need to buy a complete development system for each "built project" when using Basic Stamps.
With PIC or AVR, you only need the $0.50-$9 uC, since all the development tools aren't part of the chip, as they are with stamps. This makes discrete uCs the only financially viable choice if creating a permanent design.
Basic Stamps are good for learning how uC's work, but when actually building something, use a real uC. Spend the money saved for a nicer case or extra servos. The PicBasic Pro compiler, which is created by the same group that created the Basic Stamp, is available as a standalone compiler for many PIC uCs. This gives the easy language combined with the low cost of hardware.
When just starting, having to buy things yourself, but don't want to be overwhelmed (mentally or financially), I'd suggest the AVR based Arduino board. All the features and more, and faster, compared to a BS ][, for a price less than a BS I, though they still have the "unit cost" if used in a design.
PIC or AVR?
I didn't want to touch this one, but I may as well.
I'm partial to PIC. Most AVR development tools are free, most aren't with PIC. PIC has a wider range of "on chip" peripherals, including Full Speed USB, not available on AVR at this moment.
Cost of a PIC and comparable AVR are about the same, as far as processors themselves go.
Speed is about the same, though edged towards AVR. Most applications don't need real speed, as most of it is 'wasted' in delay loops anyway. Both are faster than the business computers of the 80's.
If working in C, the difference between them is small, if the cost of the compiler is ignored. The PIC Compilers often have simulation built in, something GCC doesn't have. AVR has the benefit of generally all having the same "API", or programming. PIC, due to thier wide variey of features, sometimes do not support certain operations in hardware. Usually, it's money saved to not have that operation.
If working in assembly: Atmel AVR wins. Microchip has kept the instruction set the same, so has some rather 'archaic' methods of doing things.
Support: Also a tie.
In the end: It doesn't often matter. I've used ATMega48's and was happy with them. I've used many more different PICs and was happy with them as well, for getting the job done.
In the end: Choose one (actual Device, not manufacturer), and learn it well. I'd suggest something along the lines of an 18F2520 or similar, or ATMega48 for "General Purpose". When a different hardware unit is needed (More I/O, Intterupts, PWM, ADC, SPI, I2C, USB, USART), those can be added with a different uC later, but for a "working stock", I find a general purpose work great for most projects.
Please comment! I wrote this in a hurry, and most likely have a few things wrong. I believe Atmel was working on a USB interface, but haven't paid attention lately. Also, the "Recommended uCs" list changes continually as new families and features arrive. The two above are from around summer of '08. Also, at the rate FPGA is growing in the hobby world, portions of this post will most likely "expire" by July of 2009.
That being said, most replies will STILL involve a microcontroller solution, and here is the reason:
People just starting in electronics want to do some VERY advanced projects. Compared to what was commonly available 20 years ago and 'just starting', what somebody new to electronics can DIY is nothing short of amazing. This is where uC's often find a home, doing jobs they sometimes aren't optimal, but are easy to use and ge the job done. They frequently play the role of steady state machine, where CPLD/FPGA is better suited, but not easier to implement.
uCs vs Discrete Logic:
The downside of microcontrollers or logic arrays is found when you dig out a widget you made a few years ago, then do something that lets the magic smoke out, the exact code isn't usually still in your mind, rarely still on the hard drive. Whereas 74xx and 4xxx series Logic ICs are easily replaced by numbers.
Why not state machines?
I'd guess about half or more of the projects I've seen microcontrollers used for are simple state machines, without the need for "actual processing". FPGA is quickly becoming the leader in consumer products due to programming being as simple to program/reprogram (hardware wise) as an AVR, with the availability of up to hundreds of I/O. The downside: Steep learning curve, not breadboard friendly due to pin count, and expense. Development tools and the 'chips' themselves are not in the uC price range (The development software and hardware easily hit 3 and 4 digit costs). In addition, "discrete logic" needs to be understood very well to have a working, efficient solution. FPGA's do not have "instruction sets", they are simply huge arrays of "blank gates" that can be configured to do a huge variety of tasks, from a grey-code to 7 segment decoder to PONG with VGA output.
What about Basic Stamps, Why do all schools have them if they aren't used?
For the price of a Basic Stamp ][, you can get the complete PIC starter set, and a license for BoostC or BoostBasic.
Speed- 40,000 basic instructions per second for BS ][, 4 Million instructions per second with a native PIC. Most of the time lag is token fetch/decode/load/run from EEPROM in the BS ][.
As for schools: They are re-usable and very easy to use, they also get huge discounts from the company that makes them.
"Stamps" are very easy to use on a breadboard, program and reprogram while learning about microcontrollers.
Basic Stamp Problem: You need to buy a complete development system for each "built project" when using Basic Stamps.
With PIC or AVR, you only need the $0.50-$9 uC, since all the development tools aren't part of the chip, as they are with stamps. This makes discrete uCs the only financially viable choice if creating a permanent design.
Basic Stamps are good for learning how uC's work, but when actually building something, use a real uC. Spend the money saved for a nicer case or extra servos. The PicBasic Pro compiler, which is created by the same group that created the Basic Stamp, is available as a standalone compiler for many PIC uCs. This gives the easy language combined with the low cost of hardware.
When just starting, having to buy things yourself, but don't want to be overwhelmed (mentally or financially), I'd suggest the AVR based Arduino board. All the features and more, and faster, compared to a BS ][, for a price less than a BS I, though they still have the "unit cost" if used in a design.
PIC or AVR?
I didn't want to touch this one, but I may as well.
I'm partial to PIC. Most AVR development tools are free, most aren't with PIC. PIC has a wider range of "on chip" peripherals, including Full Speed USB, not available on AVR at this moment.
Cost of a PIC and comparable AVR are about the same, as far as processors themselves go.
Speed is about the same, though edged towards AVR. Most applications don't need real speed, as most of it is 'wasted' in delay loops anyway. Both are faster than the business computers of the 80's.
If working in C, the difference between them is small, if the cost of the compiler is ignored. The PIC Compilers often have simulation built in, something GCC doesn't have. AVR has the benefit of generally all having the same "API", or programming. PIC, due to thier wide variey of features, sometimes do not support certain operations in hardware. Usually, it's money saved to not have that operation.
If working in assembly: Atmel AVR wins. Microchip has kept the instruction set the same, so has some rather 'archaic' methods of doing things.
Support: Also a tie.
In the end: It doesn't often matter. I've used ATMega48's and was happy with them. I've used many more different PICs and was happy with them as well, for getting the job done.
In the end: Choose one (actual Device, not manufacturer), and learn it well. I'd suggest something along the lines of an 18F2520 or similar, or ATMega48 for "General Purpose". When a different hardware unit is needed (More I/O, Intterupts, PWM, ADC, SPI, I2C, USB, USART), those can be added with a different uC later, but for a "working stock", I find a general purpose work great for most projects.
Please comment! I wrote this in a hurry, and most likely have a few things wrong. I believe Atmel was working on a USB interface, but haven't paid attention lately. Also, the "Recommended uCs" list changes continually as new families and features arrive. The two above are from around summer of '08. Also, at the rate FPGA is growing in the hobby world, portions of this post will most likely "expire" by July of 2009.