Interfacing SRAM (6264) with Arduino using 74LS138 Decoder
1. IC Selection – 6264 SRAM
• Part Name: 6264 SRAM
• Memory Size: 8KB (kilobytes) = 8 × 1024 = 8192 bytes
• Data Width: 8 bits (1 byte per address)
Address Lines Needed:
Since each location holds 1 byte and total is 8192 bytes:
2ⁿ = 8192 ⇒ n = log₂(8192) = 13 address lines
⇒ Address lines: A0–A12
2. Pin Connections (for each 6264 SRAM)
Pin Name Function Connection
28 Vcc +5V
14 GND GND
1–13 A0–A12 Address input lines (13
bits = 8KB) — Connect
to Arduino A0–A12
20 CE¯ (Chip Enable) Controlled by decoder
(Y0–Y7)
22 OE¯ (Output Enable) GND (always enabled)
27 WE¯ (Write Enable) +5V (disabled = read-
only)
11–13,15–19,21,23 D0–D7 Data Output pins —
Connected to Arduino
D0–D7
3. Memory Addressing Calculation
For 1 SRAM (6264):
• Memory = 8KB = 8192 bytes
• Address range: 0x0000 to 0x1FFF
• Needs 13 address lines (A0–A12)
For 8 SRAMs:
• Total = 8 × 8KB = 64KB
• 64KB = 65,536 bytes
• Needs 16 address lines (A0–A15)
• Address range: 0x0000 to 0xFFFF
4. Decoder – 74LS138 (3-to-8)
Used to select one SRAM at a time using A13–A15:
• Inputs: A, B, C = A13, A14, A15
• Outputs: Y0–Y7 = Connected to /CE of SRAM0 to SRAM7
• Only one output goes LOW at a time (active), enabling the selected SRAM
Enable Pins of 74LS138:
Pin Name | Must be
-------------|----------
G1 (pin 6) | HIGH
G2A, G2B (4,5) | LOW
5. Enable / Disable Logic
Signal | Level | Effect
--------|--------|--------
/CE | LOW | IC is enabled (active)
| HIGH | IC is disabled (inactive)
/OE | LOW | Output data is active
| HIGH | Output is disabled
/WE | LOW | Write operation
| HIGH | Write disabled (read-only)
➡ For read-only setup:
• /OE = LOW (GND)
• /WE = HIGH (+5V)
• /CE = controlled by decoder output
6. Shared Buses
• Address lines A0–A12 → Shared across all 8 SRAMs.
• Data lines D0–D7 → Shared, but only the active SRAM outputs data.
• Address lines A13–A15 → Go to decoder to select one SRAM.