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:
- Adafruit
- SD Data Logger - Make sure to get the headers and the battery too.
- Non-volatile FRAM breakout 32KBytes
- Digikey
Connections:
We need to make 2 sets of connections:
- 1-bit SPI connections to D13/D12/D11/D4 to be able to talk to 23LC1024
- SIO0/SIO1/SIO2/SIO3 to A0/A1/A2/A3 so we can bitbang 4-bit SPI mode efficiently
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.
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:
SPI-RAM + FRAM: