A C library for using a 24XX01 EEPROM with the Raspberry Pi Pico
The 24XX01 is a 1 Kbit Electrically Erasable PROM from Microchip. It is organised as one block of 128 x 8-bit memory and a I2C serial interface.
EEPROM Pin | Connect to |
---|---|
1, 2, 3 | NC |
4 (Vss) | GND |
5 (SDA) | Pico SDA (e.g. pin 8) |
6 (SCL) | Pico SCL (e.g. pin 9) |
7 (WP) | GND for r/w, or 3V3 for read-only |
8 (Vcc) | 3V3 |
In addition, add one pull-up 10k resistor each to SDA and SCL.
- Configure
CMakeLists.txt
in your base project to include the path to the pico-eeprom24xx01 library. Add pico-eeprom24xx01 to the list of target libraries. E.g. if the pico-eeprom24xx01 library is located one directory above (../
) the current one yourCMakeLists.txt
file should include
.
.
.
include(pico_sdk_import.cmake)
add_subdirectory(../pico-eeprom24xx01/lib eeprom24xx01)
target_link_libraries(touch
pico_stdlib
hardware_i2c
pico-eeprom24xx01
)
.
.
.
- Use the library; see the examples directory.