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

SOCKET U4-SPI  SEEPROM  117















                                                                  c8
                                                                  0.1











                                             (Wi
                  ire&Ei$      sPl SEEPRoM.  ng and circuilry requi€"
                   ments,)



                  Socket U4-SPI  SEEPROM


                  Socket U4 is wired to use SPI memory only. Figure 7.3 and Program 7.2 illusfate the
                  use of this memory type.


                  il€Wiiiiii$ilg.i   Prosram to read from and wrire to sPl SEEPRoMS
                   ,  rhis  nicroEngineerinq   Labs  prosran   can  be  found  on  their
                   ;  web  sile.   Use  lhe  lalest   version,
                   ;  PICBASIC  PRO  progr:an  to  lead  and  write   to  SPI  SEEPROMS
                   ;  Write  lo  lhe  f,rst  16  locations   of  an  external  serial   EEPRoM
                   :  oe.d  F-sc   6  locat  iors  bdck  and  send  Lo  -cD  lepeaLedly
                   ;  No!e.  For  SEEPROMS with  word  sized  addresses
                   DEFTNE  IOA.DER  USED  1               ;  allows  use  of  the  boot

                                                          ;  this  will   not  affect
                                                          ;  normal  progrm  operation.
                   DEFINE   I'D   DREG  PORTD
                   DEFINE   I,CD_DBIT   4
                   DEFINE   IJCD_RSRES  PORTE
                   DEFINE  IND_RSBIT   O
                   DEFINE   IND_EREG  PORTE
                   DEFTNE  I,CD_EBIT   1
                   INCIJUDE   \MODEDEFS   - BASZ
   122   123   124   125   126   127   128   129   130   131   132