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

CONTROLLING  THE  OUTPUT


                   AND  READING  THE  INPUT















                   General



                   Alter  all is said and done, itt  abour  the input and output, and what happens  between
                   the two of them. It has to do with how we use  the many capabilities piovided within
                   each PICA4CU,  and how creative  we are about  using  those capabilities.  In this chapter
                   we sta  leaming to use  allthe  input and output capabilities
                                                                     Fovided  on the l6FgtTA
                   using  LAB-XI.
                   .  All  the programs  we will  be discussjng  are  provided  on the support  Web site
                                  k.com $
                                                          as
                   rwwwencodergee  ,.  hich  jr  mrintained pan  of rhi"  book. Simlly  nar igare  to
                  your area  ol intetest  on the  Web site.
                     You can  copy the  liles from rhe Web  sire and run rhem on rhe 16F877Ain  the  LAB_XI.
                  The eiercises listed in each  chapter  are exercises  that are designed  to increase your
                  familiarity and  competence  with the 16F8?7A.  The answeis  to them arc not  Drovide;_
                    Tn  preparation
                                tor wriring programs.  .et  up $e L AB X I so ir  can be  prolrarned
                                                                                      wirh
                  one_mouse                                      in derajt  in App;dix A ot  lhis
                            bunon  clicl  or b] prc.cing  Ft0.  as described
                    The  yO   that uses  ICs in the seven  empty sockets  on the LAB_XI  boatd is covered
                  sepantely  in Chapters  7 and  8. These  chapters  also cover  one_wire  memory. A-to D con_
                  vefler..  and a numbef  ol relaled  thermometric  de\ ices,
                    The VO that uses the sedal  po{  (as  RS-232  or RS485)  is covercd  in Chaprer 8. This
                  covers  commrmications  between  pICs  and  personal  computers,
                    We will  leam  about inpur  and oulput  b) fir,r  q  riting  ri;ple progfams  thar  conrrol fie
                  outputs,  and  then wrire  prcgrams  that read  ihe inputs.  We  will leam how to contlol
                  the outputs fust,  because  this can  be done  direcily from the sofh{are  without need for anv
                  inpul.Once$econtrol
                                      lbe ourpur. we  $  ill ledrn  ho$ lo rcdd lhe inpuls  anJ mdke  !h;
                  outputs respond  to them in a useful and  coherent  manner The following is a list of the
                  prcgrams  to be developed.
   52   53   54   55   56   57   58   59   60   61   62