Page 476 - Robot Builder's Bonanza
P. 476
ALL ABOUT MICROCONTROLLER SPEED 445
Figure 35- 6 Microcontroller
programmer, with sockets to accept
controllers of different sizes. The
programmer connects to a host computer
via a cable.
mer connects to your PC via a serial or (more often) USB cable. Most programmers are
designed for a certain brand of microcontroller— the Atmel AVR line or the PICMicro.
Figure 35- 6 shows an STK500 programmer made for AVR microcontrollers. Like many
of its kind, the STK500 has several sockets of different sizes for accepting the different mem-
bers of the microcontroller family. To use, you plug an “empty” (unprogrammed) chip into its
corresponding socket, connect the programmer to your PC, and download your application.
Some programmers are combined with development systems, which provide numerous
standard accessories onboard. These allow you to design fully operational microcontroller
solutions, without having to create elaborate breadboards or construct custom circuits. Every-
thing (or nearly so) is already included in the development system.
All about Microcontroller Speed
If you have a personal computer, you probably know that its microprocessor runs at a certain
speed. Older PCs were rated in megahertz (millions of cycles per second); the latest models
operate in the gigahertz (billions of cycles per second) range.
Likewise, microcontrollers operate at set speeds. These speeds are rather low for a mod-
ern computational device— most MCUs operate at 4 MHz to 40 MHz. That’s along the lines
of the first IBM PCs that came out in the early 1980s!
But again, the nature of microcontrollers doesn’t require superspeeds. For one thing, many
microcontrollers are more efficient in how they execute their program code. Most microcon-
trollers can execute a single programming instruction in just one cycle of the clock. A control-
ler operating at 20 MHz can therefore process about 20 million programming instructions
each second.
Yet sometimes the speed of a microcontroller is not enough for the task you want to give it.
G Processing full- motion video is a good example. You probably wouldn’t want to task your
4- MHz MCU with reading a frame of video (there are 25 or 30 frames each second) and
analyzing each pixel for motion.
35-chapter-35.indd 445 4/21/11 11:57 AM

