Using C to interface 8051 MCUs with SPI serial EEPROMs
Keywords:application note? MCU? serial EEPROM? C compiler?
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.
Related Articles | Editor's Choice |
Visit Asia Webinars to learn about the latest in technology and get practical design tips.