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

Using C to interface 8051 MCUs with SPI serial EEPROMs

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

Keywords:application note? MCU? serial EEPROM? C compiler?

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 is written in the 8051's C compiler for the NXP P89LPC952 MCU using the Keil �Vision IDE. It was developed on the Keil MCB950 evaluation board. The code can easily be modified to use any available I/O lines.

View the PDF document for more information.

Article Comments - Using C to interface 8051 MCUs with ...
*? You can enter [0] more charecters.
*Verify code:


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

Back to Top