Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/04/06 17:49
Read: times


 
#106484 - "use code architect" and then drop half
Responding to: ???'s previous message
I used code architect
SPCTL = 0xD7;// configure SPI
ESPI = 1; // enable SPI interrupt

// send a byte
Chip_S = 1; // slave select
SPDAT = 0x09; // Send byte command
delay();
SPDAT = 0x80; // send address byte
delay();
Chip_S = 0; // end trans to


CodeArchitect:
/***********************************************************************
DESC:    Writes a byte to the SPI bus. spi_init must be called first
RETURNS: Nothing
************************************************************************/
void spi_write
  (
  unsigned char dat    // byte to write
  )
{
  // wait for previous transfer to complete
  while (mspibusy);

  // SPI now busy
  mspibusy = 1;

  // write data to SPI bus
  SPDAT = dat;
} // spi_write

/***********************************************************************
DESC:    Initializes the SPI peripheral
         SPI Clock frequency = 93.75 kHz
         Set EA to 1 after calling
RETURNS: Nothing
************************************************************************/
void spi_init
  (
  void
  )
{
  // set MOSI, MISO, /SS and SPICLK as quasi-bidirectional
  P2M1 &= 0xC3;
  P2M2 &= 0xC3;
....
Why did you "use code architect" and then drop half of the code followed by When I execute the code I do not see any response on the SPI pins.

Erik

List of 67 messages in thread
TopicAuthorDate
EEPROM to be used with the LPC936            01/01/70 00:00      
   Can you help Erik?            01/01/70 00:00      
   why not use CodeArchitect?            01/01/70 00:00      
      Yes            01/01/70 00:00      
   Part Number?            01/01/70 00:00      
      EEPROM or FRAM?            01/01/70 00:00      
         yes, costlier, but no worry about endura            01/01/70 00:00      
      I already answered            01/01/70 00:00      
         Ramtron problems            01/01/70 00:00      
            the reports of its death are greatly exa            01/01/70 00:00      
            re Ramtron problems            01/01/70 00:00      
            seems we have located it            01/01/70 00:00      
   bytes/bits?            01/01/70 00:00      
      PMPO            01/01/70 00:00      
         "RMS Power"            01/01/70 00:00      
            No such thing as RMS power            01/01/70 00:00      
         PMP0 = Pultry Meager Pathetic Offyatree            01/01/70 00:00      
      I got it!            01/01/70 00:00      
         you can stretch the endurance a lot by u            01/01/70 00:00      
            Wear Levelling            01/01/70 00:00      
   EEPROM to be used with the LPC936            01/01/70 00:00      
   Need help using SPI            01/01/70 00:00      
      "use code architect" and then drop half            01/01/70 00:00      
         I did not.            01/01/70 00:00      
            I do not know the reason, but maybe ther            01/01/70 00:00      
               Ironic!            01/01/70 00:00      
   Another Idea            01/01/70 00:00      
      ask andy            01/01/70 00:00      
         Thanks again            01/01/70 00:00      
            andy ayre            01/01/70 00:00      
               I tried LPC932            01/01/70 00:00      
                  just strikes me, write a small program t            01/01/70 00:00      
   I did yesterday            01/01/70 00:00      
      Hmm..            01/01/70 00:00      
         I tried to find it            01/01/70 00:00      
            then do so            01/01/70 00:00      
               I did exactly that            01/01/70 00:00      
                  I know that            01/01/70 00:00      
                     I am using 93LC46/56/66            01/01/70 00:00      
                        have you tried MOSI connected to MISO            01/01/70 00:00      
                           I don't            01/01/70 00:00      
                              yes            01/01/70 00:00      
                                 Nothing            01/01/70 00:00      
                                    no pullup needed, configure MOSI            01/01/70 00:00      
                                       That is what I have            01/01/70 00:00      
                                          :)            01/01/70 00:00      
                                             Pins            01/01/70 00:00      
                                                you are right            01/01/70 00:00      
                                                Thanks a lot            01/01/70 00:00      
                                                   could it be            01/01/70 00:00      
                                                      I used CA            01/01/70 00:00      
                                                         have you removed the eeprom, if not do            01/01/70 00:00      
                                                            I did,            01/01/70 00:00      
                                             It Worked Guys            01/01/70 00:00      
   I've got it            01/01/70 00:00      
      SS ignore            01/01/70 00:00      
         Why?            01/01/70 00:00      
            Ignore            01/01/70 00:00      
   Erik, one more question!            01/01/70 00:00      
      why this            01/01/70 00:00      
         Just to have something            01/01/70 00:00      
            well,            01/01/70 00:00      
               Maybe you can Help!            01/01/70 00:00      
                  sounds to me like patent avoidance SPI            01/01/70 00:00      
   It is the same or not?            01/01/70 00:00      
      I do not know and do not, at this time,            01/01/70 00:00      
         it's dawning on me            01/01/70 00:00      

Back to Subject List