Page 91 - Making PIC Microcontroller Instruments and Controllers
P. 91

Go to beginring of line 1
                      Go to  beginning  ofline 2

                      Go to a specific position  on line I
                      Go to a specific  position  on line 2
                      Show  the cursor
                      Hide the cursor

                      Use an underline  cu$or
                     Tum on cursor  blink

                     Move  cursor.ight  one  posjtion
                     Move  cursor left  one  position

                     Therc  are still other commands  to discover  in the datasheet,  There  are memory  loca
                   tions  within the LCD, as  well as  invisible locations  beyond  the  end  of the visjble 2b  char_
                   actels.  You should  know how to find all this information.
                     It is also  possible  to design  your  own font for use with this parficular  display.  All  the
                   information needed  to do so can  be found in the Hitachi t{D447g0U manuayd;sheet.

                   l.  Wdte a program  to put the 26letters of the alphabet  and  the ten numerals  in the 40
                     spaces  that are available  on the display.  put
                                                           four spaces  between  the numbers  and
                     the alphabet  to filt  in the four remaining spaces.  Once  all the characters  have been
                     entered,  scroll the 40 characters  back  and  forth endlessly  though  the two lines of the
                     display.
                   2. Write a  progmm  to bubble  the 26 capital  letters  of the  alphabet  tbrcugh  the numbers
                                                                                       .,A,i
                     0 to 9 on line two of the LCD. (This  means:  First put the numbers  oi  line two.
                                            ',0,'
                     then talces  the piace  of the   and all the numbers  move over. Then the  ,A,,   takes
                                                                             -A..rcphcei
                     lheplaceofthr"l"andthe  0  moves  to  po\ilion  L  Aierward.  the   lhe
                                                 q                 ..8..
                      r  ano  so on  Utt rt  gets  pa\l  lhe  Follou  ing  rhr(.  lhe
                                                                       sran\  irs  wa)  acrosc  trhe
                     numbers  and so on.) Loop forcver.
                   3. Write a prognm  to write the numbers  0 to 9 upside  down on line l. Wait 1 second
                     and  then llip  ihe numbers  righr side up. Loop.
                                          ..HELLO
                   4. Create a  program  to write
                                                  WORLD,, to the  alisplay  and then  change  it to low
                     ercase  one tener at a time with 100  milliseconds  between  letters.  Wait I  second  and
                     go  back  to uppercase  one chamcter  at a time with negative  letters  (all dors  on the  dis_
                     play are revened to show  a da*  background  with white letters  in lowercase).  Loop.

                  MISCELLAI{EOUS  EXERCISES

                  These  exercises  ate designed  to challenge your programming  ability. Again, you will
                  need  access  to ihe datasheet  lbr the  LC Display.
   86   87   88   89   90   91   92   93   94   95   96