Large memory for low pin count MCUs

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Large memory for low pin count MCUs

Post by mnf »

Having recently purchased and then written code to access 1MBit flash memory (also available as 2 and 4MBit chips) ( SST39SF010A)
It struck me that that it might be 'fun' to have a large memory available to smaller MCUs with less pins..

I had some 24LC256 chips - so 4 would make a 1MBit memory (128KBytes) - (and 8 would give 256KBytes all on 2 data pins of a ATTiny85 :-) )

I was also interested to see how much slower serial memory would be compared to the parallel access (- it's quite a lot slower (surprise) but the i2c chips do have some features (block read / write) which means they are still reasonably quick if you can read or write a block of data at a time.

I wired 4 24LC256 chips to the i2c bus on an Arduino Uno and connected A0..A2 to 5v to number them as 0..3.

I then modified some of my i2c-eeprom code to allow larger memory addresses (the chip being selected according to the address being written or read)

The question is - would anyone find this useful? I've hardly tested the code (I've posted it here for interest - note that some of the properties are redundant (a0..a2) chip size etc - it's only intended to work with the 24LC256 chip) If anyone thinks it could be useful I'll tidy things up - and test it a bit more diligently too!
Note that the i2c display here is not attached - I'd initially hoped it's pull-ups would be sufficient on the i2c bus.. They weren't hence the rather inelegantly applied 4k7 resistors.
i2c 1mbit.jpg
i2c 1mbit.jpg (101.76 KiB) Viewed 5864 times
big eeprom.fcfx
(23.63 KiB) Downloaded 266 times
Martin

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Large memory for low pin count MCUs

Post by Benj »

Hi Martin,

That looks excellent, thanks for sharing. I see you have one of the built in Arduino Breadboards, they look great.

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: Large memory for low pin count MCUs

Post by mnf »

The StemTERA board is very neat - couple of tweaks (power and ground to rails without a jumper?) and a choice of MCU and they could go far...

Post Reply