Skip to content
BetterDL

Chip select (CS)

Also called: chip enable, CE, memory enable, chip-select signal, chip select line

A memory chip's enable input. When chip select is active the chip responds to reads and writes; when inactive it ignores them and releases the data bus.

Chip select tells one particular chip "this access is for you". It's the memory's enable input.

  • CS active: the chip reads or writes according to its R/W line.
  • CS inactive: the chip does nothing. Writes are ignored, and its data outputs go to high impedance so other chips can use the data bus.

In a system built from several chips, the chip selects come from the high address bits. A decoder on those bits activates exactly one chip select for any address, so exactly one chip (or one bank) responds. That's depth expansion.

To read a chip select off a memory map:

  1. The chip's own address bits (log₂ of its size) vary inside its range, so leave them out.
  2. The bits above them are fixed across the range. AND them together: the variable where the bit is 1, its complement where it is 0.

Also called chip enable (CE). On real chips it is usually active low, drawn with a bar: the chip is selected when the pin is 0.

A15A14CS0CS1CS2CS3

Worked examples

Example

Chip select for a 4K chip at 7000₁₆–7FFF₁₆

16-bit address space, A15–A0.

A15A14A13A12CS
  1. 1.

    4K = 2¹², so the chip uses A11–A0. Those bits stay out of the select.

  2. 2.

    7000₁₆ = 0111 0000 0000 0000, 7FFF₁₆ = 0111 1111 1111 1111. The top four bits are 0111 in both.

  3. 3.

    CS = .

  4. 4.

    Test 7A3C₁₆: top bits 0111 → CS = 1 ✓. Test 8000₁₆: A15 = 1 → CS = 0 ✓.

Example

Reading the decoder in the diagram

Four 16K chips cover a 64K space. A15 A14 drive a 2-to-4 decoder whose outputs are CS0–CS3. The CPU accesses C1F0₁₆.

  1. 1.

    C₁₆ = 1100, so A15 A14 = 11.

  2. 2.

    CS3 = = 1; the other three are 0.

  3. 3.

    Chip 3 (C000₁₆–FFFF₁₆) responds.

Common mistakes

  • Including the chip's own address bits in the select. They change across the range, so the select would only be true for part of it.

  • Checking too few high bits. The chip then also answers at other addresses and appears more than once in the map.

  • Thinking a deselected chip outputs 0. It goes to high impedance.

Practice Chip select (CS)

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Chip select (CS) is taught in Memory.