Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MarksBench/mb_23LC1024
Very simple MicroPython module to use a Microchip 23LC1024 SPI SRAM with a Raspberry Pi Pico (RP2040)
https://github.com/MarksBench/mb_23LC1024
Last synced: about 2 months ago
JSON representation
Very simple MicroPython module to use a Microchip 23LC1024 SPI SRAM with a Raspberry Pi Pico (RP2040)
- Host: GitHub
- URL: https://github.com/MarksBench/mb_23LC1024
- Owner: MarksBench
- License: mit
- Created: 2021-05-07T05:07:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-04T06:56:08.000Z (over 3 years ago)
- Last Synced: 2024-04-22T13:31:29.406Z (9 months ago)
- Language: Python
- Homepage:
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - mb_23LC1024 - Very simple MicroPython module to use a Microchip 23LC1024 SPI SRAM with a Raspberry Pi Pico (RP2040). (Libraries / Storage)
README
# mb_23LC1024
Very simple MicroPython module to use a Microchip 23LC1024 SPI SRAM with a Raspberry Pi Pico (RP2040)This module is intended to make using the 23LC1024 as simple as possible. It only accepts an address (range 0-131071) and a value (range 0-255).
There are probably much better ways to do this but who knows, someone might find it useful.
Author: [email protected]
Version: 0.1, 2021-05-07
**NOTE: There is no guarantee that this software will work in the way you expect (or at all).
**Use at your own risk.Prerequisites:
- RP2040 silicon (tested with Raspberry Pi Pico)
- MicroPython v1.15 on 2021-04-18; Raspberry Pi Pico with RP2040
- 23LC1024 connected to hardware SPI port0 or port1 pins
- Dedicated /CS pin (can be any GP pin that's not already being used for SPI). Do not tie /CS to
GND - the 23LC1024 requires state changes on /CS to function properly.Usage:
- from machine import Pin, SPI
- import utime
- import mb_23LC1024
- Set up SPI using a hardware SPI port 0 or 1. Polarity and phase are both 0.
- specify /CS pin (can be any GP pin that's not already being used for SPI):
cs = GP#
- Create constructor:
thisMemoryChipDeviceName = mb_23LC1024.mb_23LC1024(spi, cs)
- To write a single byte to an address:
thisMemoryChipDeviceName.write_byte(address, value)
- To read a single byte from an address:
thisMemoryChipDeviceName.read_byte(address)
- See mb_23LC1024_example.pyFor more information, consult the Raspberry Pi Pico MicroPython SDK documentation at:
https://datasheets.raspberrypi.org/pico/raspberry-pi-pico-python-sdk.pdf
and the Microchip 23LC1024 datasheet at:
http://ww1.microchip.com/downloads/en/DeviceDoc/20005142C.pdf