Simple Driver for Microchip 23LC1024 SPI SRAM with RP2040

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
Mark's Bench
Posts: 9
Joined: Wed May 12, 2021 9:47 pm

Simple Driver for Microchip 23LC1024 SPI SRAM with RP2040

Post by Mark's Bench » Wed May 12, 2021 10:01 pm

Hello there!

I'm new here so please go easy on me...

Just got my first Pi Pico RP2040 a little while ago and have been enjoying tinkering with MicroPython and seeing what I can do with it.

I'm not much of a programmer (still stuck in the CBM PET days) but I put together a very simple driver for the Microchip 23LC1024 128kx8 SPI SRAM. Most of the time I've used external RAM it's been for 8-bit values, so the driver uses byte mode and doesn't support page or sequential mode. A friend of mine finally convinced me to clean it up and put it on GitHub. It's at: https://github.com/MarksBench/mb_23LC1024

There's an example.py to show how it works, but to write to the SRAM, you just feed it an address (range 0-131071) and a value (range 0-255). To read, just feed it an address.

I'm sure there are many better ways to do this, but hopefully someone will find it useful or at least get a chuckle out of it.

It should be easily portable to other devices but the RP2040 is the only one I have kicking around.

Have a good day!

Mark

Post Reply