Pi Pico Guide 05 - How to Add an EEPROM to Raspberry Pi Pico | Add EEPROM to Pi Pico

preview_player
Показать описание
In this video I have discussed about adding an EEPROM to your Raspberry Pi Pico. You can easily add the commonly available EEPROM model CAT24C32 to your Raspberry Pi Pico.

Links to purchase the EEPROM:

India:

United Kingdom:

United States:

Worldwide Ebay:

Timestamps:
00:00:00 Introduction
00:00:47 EEPROM Circuit and Board Details
00:02:33 EEPROM Library and Model
00:04:11 Adding EEPROM Library to Pi Pico
00:05:41 EEPROM Working or Demo
00:10:06 Note or Caution
00:10:29 Conclusion

Рекомендации по теме
Комментарии
Автор

This is really great, I want to do the same using c program, any libraries available?

avinashmanohar
Автор

Great Video!!! Can you please guide us How to program pico with ATOM or other Professional IDE

ayushkhandelwal
Автор

nice, added to my info library for pico/micropython, could also just create a data file on the internal drive.

jyvben
Автор

Excellent demonstration Sid! But I cannot read the circuit diagram, sorry. Do you have a hand drawn schematic please with standard symbols and where connections are made to components that leave little or no ambiguity? Thank you, I would like to add EEPROM to my Pico projects so I can learn more and perhaps share my ideas too.

alexandracrawford
Автор

can this be implemented in the Arduino ide?

skyde
Автор

What are use cases for eeprom in context of Pico? Just curious. Thx!

RonKJeffries
Автор

dude i was seeing your chromeos tutorial, will i loose the data in the partition in which i install chromeos or will it work like wubi?

marshcandy
Автор

I am using an ST Micro M24C32 EEPROM on a Pi PICO project (using Micropython). Nothing seemed to help get the EEPROM to consistently read and write correctly/completely.
All the examples I found online were not helpful, until I opened the .vscode folder (provided with PICO-Go, I believe). .vscode>>Pico_Stub>>Stubs contains the information I needed. My app is now WORKING correctly. I use boot.py to allow the serial number to be entered, then use os.remove("boot.py") to eliminate the ability to change the serial number... and when boot.py closes, then main.py takes over.

In the file "machine", there is class I2C, under which I found the following exerpts (after this paragraph) - WHICH CONTAIN THE MISSING ELEMENT IN EXAMPLES I HAD PREVIOUSLY FOUND: addrsize: int = 8. NOTE: If your EEPROM datasheet shows that it requires two bytes of ADDRESS (e.g. three nibbles with four leading bits == "0"), then you need to include "addrsize = 16", so for example: "i2c.readfrom_mem(80, 0, 32, addrsize = 16))" to read AND "i2c.writeto_mem(80, i, SerialNumber1, addrsize = 16)" to write. [the default addrsize == 8 bits of address!!!!]

Micropython:
(from machine import I2C)

Class I2C:

def readfrom_mem(self, addr: int, memaddr: int, nbytes: int, /, *, addrsize: int = 8) -> bytes:
"""
Read *nbytes* from the slave specified by *addr* starting from the memory
address specified by *memaddr*.
>>>The argument *addrsize* specifies the address size in bits.
Returns a `bytes` object with the data read.

Memory operations

Some I2C devices act as a memory device (or set of registers) that can be read
from and written to. In this case there are two addresses associated with an
I2C transaction: the slave address and the memory address. The following
methods are convenience functions to communicate with such devices.
"""
AND

def writeto_mem(self, addr: int, memaddr: int, buf: bytes, /, *, addrsize: int = 8) -> None:
"""
Write *buf* to the slave specified by *addr* starting from the
memory address specified by *memaddr*.
>>>The argument *addrsize* specifies the address size in bits (on ESP8266
this argument is not recognised and the address size is always 8 bits).

The method returns ``None``.

Memory operations

Some I2C devices act as a memory device (or set of registers) that can be read
from and written to. In this case there are two addresses associated with an
I2C transaction: the slave address and the memory address. The following
methods are convenience functions to communicate with such devices.
"""

jsbrodhead