Page 104 - Anatomy of a Robot
P. 104

03_200256_CH03/Bergren  4/17/03  12:27 PM  Page 89
                                                                                COMPUTER HARDWARE 89
                              Computers came into being during World War II. They were made using vacuum
                            tubes and were built in an effort to break enemy codes. Here’s a nice site covering the
                            history of computers: www.eingang.org/Lecture/index.html.
                              Not surprisingly, the best choice for the robot is the cheapest computer that gets the
                            job done. Many design variations exist among the hundreds of computers that are avail-
                            able. To choose the best computer for the robot, we need to be well acquainted with the
                            innards of the machines. This will give us a better perspective when the time comes to
                            choose.
                              Computers have basic characteristics and architectures that have been worked out
                            over the years. We’ll take a look at each in turn.



                            WORD SIZE
                            Computers have, within them, the equivalent of a natural word size. They store and
                            manipulate digital data that is represented by n bits, each representing a 1 or 0. An 8-bit
                            computer has 8-bit words that store numbers from 0-255. A 16-bit computer has words
                            that store numbers from 0-65535. The word size of a computer tells you the innate capa-
                            bility of the computer to manipulate numbers easily. The larger the word size, the faster
                            the computer will be able to handle calculations involving large numbers. The first mod-
                            ern computer chips were 4-bit machines. I guess marketing didn’t like the sound of sell-
                            ing 2-bit computers! All the internal structure of the 4-bit computers (the details of
                            which we’ll get to later in the chapter) were 4 bits wide, just enough to store the num-
                            bers from 0 to 15 decimal. That’s great for counting the moons of Neptune (8 moons),
                            but not Jupiter (47 moons and counting). To count Jupiter’s moons, a 4-bit computer
                            would need to use 2 of its words (8 bits), which would give it a capacity to count 256
                            moons. A 4-bit computer can still do the work, but it will be slower than an 8-bit com-
                            puter at the same job because it has to do at least twice as many operations.
                              Modern microprocessors that we could use in our robot range between 8- and 64-bit
                            word sizes. The 8-bit computers are generally well suited for most simple robot calcu-
                            lations and control system loops, but it’s not a very expensive proposition to look at 16-
                            and 32-bit computers. Computers with 64-bit word lengths begin to get pricey. One
                            must look at a few central considerations when choosing the word length of the com-
                            puter for the robot. Most robot designs have 8-bit processors to save power and money.
                                Data length   How well does the word length of the computer match the data
                                 streams that the robot will have to deal with? If the computer is gathering vision
                                 data in 16- or 24-bit words, consider using a 32-bit computer. It is not unlikely that
                                 we’ll have to perform 32-bit arithmetic anyway. If all the data gathering inside the
                                 robot generates 8-bit data, consider an 8-bit word length. But look closely at the
                                 arithmetic required. Be aware that even a simple addition of data can engender
   99   100   101   102   103   104   105   106   107   108   109