DN Staff

May 7, 2001

5 Min Read
8-bit microcontrollers: a place to start

Eight-bit microcontrollers-called that because they operate on data eight bits at a time-continue to dominate the microcontroller market, although 32-bit controllers are showing faster market growth. But many embedded applications don't really require much processing power, and an 8-bit device can more than handle the job. For example, keyboards and remote controls are usually in some kind of sleep mode and only "wake up" when someone pushes a key or button.

One of the primary uses for 8-bit controllers is replacing electromechanical devices in myriad applications. Two examples are smart switches and light dimmers. "Most electromechanical designs have some sort of user input from components such as switches and push buttons," notes Kevin Kilbane, an application engineer with the Embedded Control Division of Motorola's Semiconductor Products Sector. "A microcontroller can easily and often cost effectively replace mechanical switches."

Added reliability is another microcontroller benefit. Most 8-bit controllers have some sort of user output via drivers for LEDs or LCDs. "By using a programmable controller, designers can usually make their product easier to use through creative use of input and output devices," says Kilbane. For example, a smart thermostat could step users through a setup with prompts on the display instead of requiring them to dial knobs or set switches to determine at what times and temperatures the heat comes on.

Yet another benefit is the ability to add intelligence to a device. Microcontroller-controlled coffee makers can automatically turn on and make coffee at user-determined times. Smart refrigerators could run a diagnostic test to determine if service was needed before a simple problem became a more expensive problem.

Basic parts. A microcontroller contains all the hardware and software necessary to control an application. Parts include: the CPU; read-only memory (ROM), one-time-programmable (OTP) memory, or flash memory to store the software the processor executes; random-access memory (RAM) to store temporary data; and peripherals such as timers, serial interfaces, and display drivers.

One of the more important decisions an engineer has to make is what type of program memory to specify. ROM parts have the controller's program code hard-wired; OTP memory lets companies program a part once, but the code doesn't have to be the same for each controller; and flash memory is electrically erasable and reprogrammable, which let's companies fix mistakes but is more expensive than the other two memory types.

This 8-bit microcontroller from Motorola features flash program memory, an analog-to-digital converter, and a type of watchdog timer that monitors whether the CPU is operating properly. The general-purpose device suits such applications as radar detectors, security systems, home appliances, electronic power meters, and wireless communication.

However, the cost of flash is much higher than that of OTP memory and in some instances is competitive with that of ROM, which is driving a huge increase in demand. Flash lets customers conveniently and cost-effectively fix software bugs, accommodate other software changes, and enable end users to upgrade products such as modems remotely and without removing the microcontroller from the end product.

Once a microcontroller's OTP memory is programmed, changing program code means throwing the device away and replacing it with a new one. Companies typically use OTP parts for limited production runs to test code before investing in a ROM mask. However, with the programming, setup, and engineering charges associated with ROM, it's usually only economical when using large quantities of identically programmed microcontrollers-but in this instance, it's the cheapest way to go.

Peripheral parts. The peripheral mix is what really distinguishes microcontrollers, and most device families have dozens of members, each with its own unique combination. Here's a quick introduction to some of the more basic peripherals.

  • Timers synchronize events in the processor with events in the real world. They can also generate a pulse train on an infrared LED or create a pulsed output to drive a motor at a particular duty cycle. Every microcontroller has at least one timer.

  • A/D converters convert an external analog signal to a digital representation, which the controller's CPU can manipulate.

  • D/A converters take a digital number and convert it to an analog voltage level, typically an output signal for controlling circuitry.

Serial communications ports let the controller communicate with other chips or systems, or via a bus.

Parallel I/O lines let the chip output high or low voltage to control circuitry, such as turning an LED on and off to transmit an infrared message from a TV remote control. These lines can also sense high or low voltage to gather information from a piece of circuitry.

Limitations. "Typically, customers move to higher-end microcontrollers when they need to move data faster than an 8-bit controller can run or when they need to run very-high-speed,16-bit-plus algorithms, such as DSP filtering," says Motorola's Kilbane. He adds that an 8-bit controller can use complex algorithms but at slower speeds.

In fact, 8-bit devices can do more than you might think. "In the last several years, the processing power of 8-bit microcontrollers has grown such that they can compete well with 16-bit microcontrollers," says Rodger Richey, Advanced Microcontroller and Systems Div. applications manager at Microchip Technology (Chandler, AZ). "Usually the 16- and 32-bit controllers have much higher clock rates. We see instances where 8-bit controllers are actually replaced more by DSPs than by 16- or 32-bit controllers. DSPs provide much higher processing power."

Microcontrollers are not only a big business but a competitive one-companies will go out of their way to secure a design win. Some of the major vendors are Motorola, Microchip, NEC, Texas Instruments, Hitachi, Fujitsu. All have application engineers ready and willing to help new users. If you need more design help than an application engineer can offer, a company can refer you to a third party that specializes in designing with and programming its microcontrollers. Most firms offer evaluation kits, reference designs, and many other resources as well.

To contact a Microchip Technology technical support engineer, e-mail [email protected].

Sign up for the Design News Daily newsletter.

You May Also Like