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

i54   USlt{G LIOUID CRYSTAL OISPLAYS! AN EXIEI{DED INFOnMATIO nESOURCE









                   o
                         u""o
                    E E V O O
                    --   Yq
                    - - : :
                    ftft   :*
                    f t f t
                    E E z





                    E
                    E E
                    - -
                    E E
                    E E
                    - -
                    - -
                   o       o



            :liFlSillqi**i:l  wiring diagram: LCD backpack using a PIC 16F84.  {The  dala can be  programmed
              to come in at any free line. 11does not have 10 be on  pin  B7,You set lhe line  you  want  io use  In
              Program
                     9.1.)



                    Liquid      Crystal                      Exercises
                                              Display


                    These liquid crystal exercises are to be  performed  on the LAB-XI  board.
                    l.Write  a  program  to put the 26letters  ofthe alphabet  and the ten numerals in the
                      40 spaces that are avai)able on Iine l.  lnsert  four spaces between  the numbers
                      and the alphabet to fill  in t]}e four remaining spaces. Once all the characten have
                    .  been efltered, scroll t}Ie 40 chamclers back and fortl  endlessly though lhe 20
                      spaces visible on line l.
                    2. Write a  program  to bubble the 26 capital letters  of the alphabettbrough the numbers
                                                                                        "A"
                      0 to 9 on  line 2  ofthe  LCD.  (This  meansr First,  put  the  numbers  on  line 2. Then,
                                         "0"                                    "A"
                      takes the  place  ofthe   and all the numbers move  over.  Then, the   takes the
                                 "l"        "0"
                      place  of the   and  the   moves  back to position  1 and so on till it gets past
                                    "B"
                      the L Then,  the   starts it way across the numbers, and so forth.)
                    3. wdte  a program  to write the numbers 0 to 9 upside down on line L Wait I second
                      and then flip  the numbers right side up one by one. Provide a time delay between
                      chanses. LooD.
   157   158   159   160   161   162   163   164   165   166   167