Page 469 - Robot Builder's Bonanza
P. 469

438  UNDERSTANDING MICROCONTROLLERS











                                                               Figure 35- 1  Example  low- cost
                                                               modular microcontroller, designed for
                                                               learning and experimentation. It contains
                                                               the microcontroller chip itself, plus a
                                                                 liquid- crystal display, button joystick,
                                                               and other components.






                   8-  16- , OR 32- BIT ARCHITECTURE
                   As with your desktop computer, microcontrollers come with different  data- processing archi-
                   tectures; these are denoted by the number of bits they process at one time.

                   •   The oldest and simplest of microcontrollers used 4- bit processing. These are of little use to
                     us today, and, besides, they’re no longer common in the consumer  chip- selling market-
                     places.
                   •   On the other end of the spectrum are MCUs that handle 64 bits at a time. These are spe-
                     cialty chips used for  high- end applications and, as such, tend to be expensive and more
                     difficult to program. (Of course, these limitations could and probably will change as time
                     marches on. That’s progress for you.)
                   •     Middle- of- the- road microcontrollers handle 8, 16, or 32 bits at a time. The most common
                     for amateur robotics is the 8- bit variety, which, despite handling “only” 8 bits at a time, is
                     ideally suited to the vast majority of robot programming tasks.  Eight- bit MCUs are the least
                     expensive and the most widely available.

                   Recall that the bit is the smallest value that can be stored in the memory of a microcontroller or
                   processed through its circuitry. A bit is either off or on. The two possible values for a bit are
           G       most commonly represented by the numerals 0 and 1. The value stored in the bit is not  really a
                   numeric “zero” or “one”; the 0 and 1 are used as a kind of shorthand. Other shorthands
                   include LOW for 0 and HIGH for 1.


                   LANGUAGE PROGRAMMING
                   All microcontrollers need to be programmed for the task you want them to do. None “just
                   work” out of the box (exception: they come preprogrammed with a demo).
                     There are two general methods of programming a microcontroller, which, for the lack of
                   better terms, I’ll call  low- level programmable and  integrated- language programmable.
                   These loosely defined terms relate to how the programming is stored and executed in the
                   controller. Both kinds of microcontrollers are fully programmable.









   35-chapter-35.indd   438                                                                     4/21/11   11:57 AM
   464   465   466   467   468   469   470   471   472   473   474