Question: Problem 5. The Microchip 25LC256 is a 256 Kbit serial EEPROM. The following questions relate to reading data from this device with SPI2 on a
Problem 5. The Microchip 25LC256 is a 256 Kbit serial EEPROM. The following questions relate to reading data from this device with SPI2 on a PIC24FJ64GA002 . Assume SPI2 operates in 8-bit mode with a 5 MHz clock. (a) For SPI there are 8 phasing modes which are controlled by the CKP, CKE, and SMP bits in the SPI2CON1 control register. What values should we use for these bits to read the 25LC256? (b) The 8-bit data is written to and read from the 8-bit bu er SPI2BUF. The Receive Bu er Full status bit, SPIRBF, is located in the SPI2STAT register. The active low chip select, CS, for the 25LC256 is connected to pin RB14 which is con gured as a digital output. Code a C function to read a 4-byte word from the 25LC256. Use the prototype: int readEEPROM(int address). (c) With a 5 MHz clock how long does it take to read the 4-byte word from the EEPROM?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
