Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Controls/MCUs
?
?
Controls/MCUs??

Using a hardware module to interface 8051 MCUs with SPI serial EEPROMs

Posted: 25 Jun 2008 ?? ?Print Version ?Bookmark and Share

Keywords:application note? MCU? EEPROM? hardware module?

This application note offers designers a set of examples for the read-and-write functions for the Microchip SPI serial EEPROM (byte read/write and page read/write) using internal hardware parts and a main routine. The main routine writes a string in the SPI serial EEPROM, reads it back and compares the two strings, displaying the results on LEDs on an evaluation board. Moreover, the main routine sends the results of the read to the UART to verify the correctness of operations.

The firmware was written in assembly language for NXP's P89LPC952 MCU using the Keil ?Vision3 IDE and was developed on the Keil MCB950 evaluation board.

The code was tested using the 25XX256 serial EEPROM. The EEPROM features 256Kbit of memory and 64byte pages. Oscilloscope screen shots are shown in this application note. All timings are based on the internal RC oscillator of the MCU (7.373MHz). If a faster clock is used, the code must be modified to generate the correct delays.

The bus speed in these examples is about 1.8MHz. As explained in the applicable SPI serial EEPROM data sheets, the maximum allowed bus speed depends on the EEPROM's operating voltage. If desired, the bus speed may be changed in the initialization routine by modifying the SPR1 and SPR0 bits in the SPI control register.

View the PDF document for more information.





Article Comments - Using a hardware module to interface...
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top