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.
Martin
Large memory for low pin count MCUs
- 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
Hi Martin,
That looks excellent, thanks for sharing. I see you have one of the built in Arduino Breadboards, they look great.
That looks excellent, thanks for sharing. I see you have one of the built in Arduino Breadboards, they look great.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Valued Contributor
- Posts: 1208
- Joined: Wed May 31, 2017 11:57 am
- Has thanked: 70 times
- Been thanked: 440 times
Re: Large memory for low pin count MCUs
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...