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

Interfacing 8051 MCUs with SPI serial EEPROMs

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

Keywords:application note? MCU? EEPROM? SPI?

Microchip SPI serial EEPROM (byte read/write and page read/write) using a main routine and the "bit-bang" method, which implements serial communication on any MCU, including those lacking built-in serial support.

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 a main routine and the "bit-bang" method, which implements serial communication on any MCU, including those lacking built-in serial support. 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 can easily be modified to use any available I/O lines.

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 500 kHz. 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 decreased by introducing supplementary delays in the low-level routines.

View the PDF document for more information.





Article Comments - Interfacing 8051 MCUs with SPI seria...
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