You're currently on: Catalog » Guides » How to add 8K of SRAM to a 6502 computer
A 6502 needs writable memory for its stack, variables and changing data. An 8K×8 SRAM can provide 8,192 byte locations—but it must be selected only in its own address window, and only one device may drive the data bus.
The 8K counts locations, not bits: 8,192 addresses each hold an eight-bit byte. That is 8 KB, or 65,536 bits. Thirteen address inputs, A0–A12, select one location (2¹³ = 8,192). Eight bidirectional I/O pins carry the byte. Static RAM retains its contents while powered and does not need refresh, but it is volatile: power loss erases the data.
A 6502 has a 16-bit address bus, so its full map is 64 KB. In this example, the SRAM occupies $0000–$1FFF. Its A0–A12 connect to the corresponding CPU address bits. The higher bits A13–A15 go to an address decoder. When all three are zero, the decoder asserts a select signal; otherwise the RAM must stay silent. A 74HC138 can provide an active-low Y0 output for this window, as explained in the address-decoding guide. Other 8K windows may be assigned to ROM or I/O, but a usable computer also needs its reset vector in ROM at $FFFC–$FFFD.
$0000–$1FFF
$FFFC–$FFFD
The Fujitsu MB8464A has two chip selects: /CS1 must be low and CS2 high. For a read, /WE remains high and /OE goes low; the SRAM then drives its data pins after its access delay. For a write, the CPU drives the byte and /WE goes low while the SRAM is selected. The datasheet says /OE is irrelevant during a write. When the SRAM is not selected, its outputs are high impedance so another chip can use the bus. The 6502 R/W pin is high for a read and low for a write, but a real design must qualify these signals with the valid bus phase and check the chip’s timing—not simply wire every control pin straight through.
/CS1
CS2
/WE
/OE
On the MB8464A, pin 28 is +5 V and pin 14 is ground. Pin 20 is /CS1, pin 26 is CS2, pin 22 is /OE and pin 27 is /WE. Pin 1 is NC, not another address bit. The drawing is a top view; check the notch and the exact package before placing a chip. The shop’s MB8464A-10LP-SK is the narrow 28-pin PSK through-hole variant; similar 6264-class chips may have different package shapes or control-pin conventions, so compare their own datasheets rather than assuming drop-in equivalence.
NC
Start with the CPU held in reset or use a controlled test fixture. Confirm +5 V and ground, then verify that only the intended address range selects the SRAM. During a read, look for valid data after the access-time limit; during a write, confirm address and data are stable for the required setup and hold times. The -10 part has a 100 ns maximum address access time under the datasheet conditions; that number alone does not prove a whole 6502 system will meet timing. Add supply decoupling close to the IC and avoid connecting a 5 V part directly to a lower-voltage bus without checking logic levels.
The shop carries the Fujitsu MB8464A-10LP-SK 8K×8 SRAM and SRM2264LC12 8K×8 SRAM. Check the current listing and each manufacturer’s datasheet for the exact package and timing. If address selection is new to you, read how the 74HC138 selects a memory chip; the 6502 parts guide shows where RAM fits in the larger machine.
Source: Fujitsu MB8464A datasheet (April 1990, edition 3.0). PDF.
We use cookies to provide you with the best possible experience. They also allow us to analyze user behavior in order to constantly improve the website for you.