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

GENERAI.   141







                   $rE,   $0X   Clear  Display-   1An uncleared  display   shows  dark
                                rectangles   in  all   .he  spaces,   which  nay  app€ar
                                blot.hy   and  irreq!1ar)   .
                   $FE,  $02    Go  to  home.  Fosition   one  on  Line  one.
                   SFE,  Soc    A11  cursors   orF.  lhis   is  the  delauLt   condirrion  on
                                slarLup.
                   SFE?  $08    Underline   Curso!   0N
                   SrE,   $0F   UndexLine  cursor  oFr.  This  is  rhe  defaulr   condiii..
                                on  s.ar.up  -
                   StE,   $10   1,4ove- cursor  risht   one  posrtion.
                   gFE,   $11   llover  cursor  left   one  position.
                   sFEr  S8O    14ove .ursor   ro  posirio4   one  of  Line  one.
                   $FE?  $c0    l4ove  .ursoi   to  Fosilion   one  of  Line  tno.
                   $FE,  S91l   Move  cursor  to  posiiion   one  ol  line   three,
                   SFE,  SD4    Move  cursor  to  posiaion   one  cf  line   four.






                                                                             (scc
                    All these and orhef codes  are dcscdbed in detail in the Hitachi darashecr  Tablc  9.1).
                  You must leam where  lhcsc arc located so  you  can.efefto them whcn necessary,
                    These commands  apply lo all LCDS using the Hiiachi HD4:17lj0U  conlrcller or its
                  equivalent.  Sec thc dalasheet fbr this contloller for morc detailed infbrlnation. This
                  controller has  nany commands not shown herc,  including linited graphic  capatrility
                  (within  thc characteB) and the ability to display Japanese kana characters-
                    Ilis uselul to ha!e thefull40+pagc  datasheetonhand whenevefdoing anything morc
                  than sending text to the LCD. Thc Hiuchi,l,l780 darasheei can be downloadcd  at  no
                  charge fiom the following Wcb  si!ci

                  x  ww\\'-alldatasheet.corn/datasheet-pdf/pdf/63673/H
                                                               ITACHyHD44780.html
                                                            wirh its owr stadng  posirion  as indi-
                    LCD  displays rcquirc that each line be addressed
                  cated  earlicr Thc exceplion is that most l6 characld singleline displays afe designed
                  such thal the lint  eight charxcters stirt at  $80.  and the nexr eight siarr ar  $C0.  so thar
                  the 16  charactcrs appear to be od rwo lincs  !o thc conroller though rhey are displayed
                  as onc  ljnc  on the LCD lnodule. Also notc  thal lines 3 and 4 offourline  displays also
                  havc  an i  egular addressing scheme.
                    II more characters than can  be displayed on a line afe sent to the LCD.  thcy  \rill bc
                  stored in lhe memory in thc  LCD and can be scrolled across thc scrccn  when needed.
                  The number of charactcrs  that an LCD can store in its display  mcnory is a  properry  of
   144   145   146   147   148   149   150   151   152   153   154