Connecting 128KB SPI-RAM to Arduino Mega

2019/07/19

If you don’t need the additional GPIO’s on Arduino Mega, you can instead use Teensy adapter for more memory and faster speeds.

As I mentioned earlier, Microchip 23LC1024 is an SPI RAM with 128KBytes, giving us 2 banks of 64KBytes. Since I also want to enable file I/O and RTC for RetroShield, best option was reworking a 23LC1024 to Adafruit SD Card Logger Shield.

What you need:

Connections:

k1802

We need to make 2 sets of connections:

23LC1024 Pin Arduino Pin
1 (CS) D4
2 (SO/SIO1) D12 and A1
3 (SIO2) A2
4 (GND) GND
5 (SI/SIO0) D11 and A0
6 (SCK) D13
7 (HOLD/SIO3) A3
8 (VCC) 5V_VCC

Note: SD Data Logger uses D10 (SPI_CS) for SD Card, hence we are using D4 for SPI-RAM CS.

Adafruit SD Logger

FRAM breakout is connected to I2C bus, so you need only four connections. If you notice, SD Data Logger has two rows toward D7..D0 where one row is 5V and the second is GND. you can place the FRAM breakout board over those two pins to save some wire :)

FRAM Pin Arduino Pin
1 (VCC) 5V_VCC
2 (GND) GND
3 (WP) No Connect
4 (SCL) SCL
5 (SDA) SDA
6 (A2) No Connect
7 (A1) No Connect
8 (A0) No Connect

Last, SD Data Logger Shield has two spare LED, near the SD Card. I connect these to A4 and A5 so I can blink Red and Green LED for Read & Write Cache Misses (gives you some indication about the memory access pattern):

LED Pin Arduino Pin
L1 (LED1) A5
L2 (LED2) A4

This is how my rework looks for SPI-RAM only:

Adafruit SD Logger

Adafruit SD Logger

SPI-RAM + FRAM:

Adafruit SD Logger

Adafruit SD Logger