3.8. PIC16 C EEPROM Interface

• EEPROM test system

• EEPROM test program

The internal electrically erasable programmable read only memory block is not strictly speaking a peripheral, as it is internal to the MCU, but it is accessed in a way similar to external devices so it is included in this part. In the 16F877, the EEPROM is a block of 256 bytes of nonvolatile read/write memory. It allows data to be retained while the power is off, which is useful in applications such as an electronic lock where a secure code needs to be stored.

Figure 3.11shows a test circuit that demonstrates its operation. Arbitrary 8-bit codes are set on the switch bank, which are stored, recalled, and displayed on the LED bank. The R/!W (Read/Not Write) input switch is ...

Get Programming 8-bit PIC Microcontrollers in C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.