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

FESOUFCE
             i4a   USING LlOUlD  CBYSTAI  OISPLAYST Ail EXTE T ED IIFOBI/|ATION







                                             PIC PIN    DESIGNATION
                         1       VSS                    llel esnne6l€d  te the l'l€
                        ?        vDD                    I'lei€er1e€led  lelhe  Pl6
                        3        \'e                    lJ€l eenne€t€d  te !h5 nle
                        4        RS             ]       RAz POITA
                        5        B W            2       F A 3
                        6        E             1 8
                        7     D     B     O     6




                        ]O       DB3
                        11       DB4
                                                              "
                                 DB5           11       RBs         )  Half lhe  pon  can  also be use
                                                              '
                                                        BBo         )See  PBP  manual
                                                              "
                                                        RB7         )
                        15       BE                     N6l6e1n€€tsd  te th€ Plg
                        16        BL                    lt€t oenneotsd  16 ihe Pl€






                       Table 9.4  i ndicales that  our mio ocontroller  does  not necd to  be connected  to lines  I  '
                                                                           and nol rvith dala l/O
                     2.  3, 15, and  16 in thal thcse  have lo do  with powcr connecliorrs
                     ln the  preccding case. wc will use an 8 bit data buss.  and thc conneclion  to the PIC
                      16F877Awill  be  as shown ir  lJigure 9 1.
                        we can  get  by with ll  lines,  and  possibly  even  l0 if we decjde  to do  withoul
                     the ability to read from the display  nremory.  This is not usually  the  case, however,
                     because  thcre  are ti  cs  when we  need to sel lhis  line high  for reading  the LCD'S
                     busy  flag in ordef  to minimize lhe time used by LCD rolrtines Nevcrtheless.  \\'e
                      car add abolLi a  20-milliscconds  delay  io take carc  ofthe busy  time Wc also necd
                      to be able to rcad  the displa, memory il we want to scroll  the display  up and have
                      acccss  to what  is on ciisPlay  lines one and  two Since this  wouldbe  true ibr all apPli
                      cations,  rve have  to stay wi!h  the l1 lincs  for 8-bil control  (We  nould not  have 10
                      read !he  display  if we kepl lrack  of what we had  put in the display  somewhere  elsc
                      in thc  emory.)
                        The cight  daia lincs  fonn a coD\'crient  bylc. and  we can assign  onc of the  Porls  not
                      being  used  lbr anything else.  This lcaves  three  lrnes:
   151   152   153   154   155   156   157   158   159   160   161