Page 106 - The Ultimate Palm Robot
P. 106

Color profile: Generic CMYK printer profile
           Composite  Default screen
                                                          Bots /The Ultimate Palm Robot/ Mukhar & Johnson / 222880-6 / Chapter 4






                                                     Chapter 4  Using Palm VIIs and Handspring Visors  89



                                      The baud rate at which the SV203 operates is set by a memory location in
                                    the EEPROM of the SV203. The controller can be set to any baud rate between
                                    2400 to 19200 baud. The default setting is 9600 baud, which is the same rate as
                                    the Palm VII. However, if either device is slightly off 9600 precisely, the Palm
                                    VII will not be able to communicate with the SV203. Symptoms of this prob-
                                    lem include these: the Palm sends commands that the SV203 does not seem to
                                    receive, or the Palm VII does not receive sensor readings from the SV203.
                                      To solve the communication problem, you will need to change the baud
                                    rate of the SV203. And that leads us to the joke of the day:

                                      Q: How many roboticists does it take to change the baud rate?
                                      A: None; it’s a software problem!
                                      This, of course, means you’ll need to take a look at Chapter 7 to learn how to
                                    write a program for the Palm VII and the PPRK, and you’ll use that program to
                                    adjust the baud rate of the SV203. If you’re not that ambitious, we provide a
                                    program for you in the next section. (This is starting to feel like one of those in-
                                    teractive, reader-directed stories. If you choose to open the chest, go to page
                                    395. If you choose to go through the door marked “Danger! Here be dragons.”
                                    go to page 277.)

                                      If you need to change the baud rate, you will need to start at Chapter 7, where
                                    you can see how to write and use programs for the Pontech controller. Read the
                                    section about using BASIC programs. Go ahead. We’ll wait here patiently.
                                      Back already? Okay, let’s go.


                         Changing the Baud Rate
                                    If you check the SV203 technical manual that came with the controller board,
                                    you’ll see a section on commands you can send to the SV203 to change its con-
                                    figuration, to read a sensor, or to send a command to a servo. The command
                                    we are interested in is the command to change the EEPROM setting for the
                                    baud rate. Here’s the command to write to the EEPROM memory:


                                   WEm n

                                    You can find this command detailed on page 20 of the SV203 technical manual.
                                    The m is an integer that can range from 0 to 11. The EEPROM register for the










           P:\010Comp\Bots\880-6\ch04.vp
           Monday, May 12, 2003 4:03:12 PM
   101   102   103   104   105   106   107   108   109   110   111