Semiconductor memories used in microcontrollers.

Ajinkya Sathe
10 min readMay 21, 2023

Volatile memory is a computer memory that requires power to maintain the stored information; it retains its contents while powered on but when the power is interrupted, the stored data is quickly lost.

Volatile memory has several uses including as primary storage. In addition to usually being faster than forms of mass storage such as a hard disk drive, volatility can protect sensitive information, as it becomes unavailable on power-down. Most general-purpose random access memory (RAM) is volatile.

Volatile memory is again divided into two :-

1) SRAM :- Static random-access memory (static RAM or SRAM) is a type of random access memory (RAM) that uses latching circuit(flip flop) to store each bit. SRAM is volatile memory; data is lost when power is removed.

The term static differentiates SRAM from DRAM (dynamic random-access memory) — SRAM will hold its data permanently in the presence of power, while data in DRAM decays in seconds and thus must be periodically refreshed. SRAM is faster than DRAM but it is more expensive in terms of silicon area and cost; it is typically used for the cache and internal registers of a CPU while DRAM is used for a computer’s main memory. SRAM offers a simple data access model and does not require a refresh circuit. Performance and reliability are good and power consumption is low when idle.

Since SRAM requires more transistors per bit to implement, it is less dense and more expensive than DRAM and also has a higher power consumption during read or write access. The power consumption of SRAM varies widely depending on how frequently it is accessed.

Timing Diagram

2) DRAM :- All RAM types, including DRAM, are a volatile memory that stores bits of data in transistors. This memory is located closer to your processor, too, so your computer can easily and quickly access it for all the processes you do.

As you use your computer, it needs to recall data and programming code for the CPU to process. RAM provides a way for the computer to use, rewrite, and temporarily save this data and code in real-time. Because the transistors need electricity to work, however, anything stored here disappears when you turn your PC off. That’s why it’s considered “volatile.”

Timing Diagram

OTP ROM: One-time programmable ROM

• user provides file of desired contents of ROM

• file input to machine called ROM programmer

• each programmable connection is a fuse

• ROM programmer blows fuses where connections should not exist

• Very low write ability — typically written only once and requires ROM programmer device

• Very high storage permanence — bits don’t change unless reconnected to programmer and more fuses blown

• Commonly used in final products

Non-Volatile:-

Non-volatile memory (NVM) or non-volatile storage is a type of computer memory can retain stored information even after power is removed. In contrast, volatile memory needs constant power in order to retain data.

Non-volatile memory typically refers to storage in secondary memory chips, which store data in floating gate memory cells consisting of floating gate MOSFET, including flash memory storage such as NAND flash and solid state drives (SSD).

Other examples of non-volatile memory include read only (ROM), EPROM (erasable programmable ROM )

and EEPROM (electrically erasable programmable ROM), ferroelectric ROM, most types of computer storage devices, and early computer storage methods such as punched tape and cards.

PROM:-

A programmable read-only memory (PROM) is a form of digital memory where the contents can be changed once after manufacture of the device. The data is then permanent and cannot be changed. It is one type of read-only-memory (ROM).

PROMs are used in digital electronic devices to store permanent data, usually low level programs such

as firmware or microcode. The key difference from a standard ROM is that the data is written into a ROM during manufacture, while with a PROM the data is programmed into them after manufacture. Thus, ROMs tend to be used only for large production runs with well-verified data. PROMs may be used where the volume required does not make a factory-

programmed ROM economical, or during development of a system that may ultimately be converted to ROMs in a mass produced version.

PROMs are manufactured blank and, depending on the technology, can be programmed at wafer, final test, or in system. Blank PROM chips are programmed by plugging them into a device called a PROM programmer. Companies can keep a supply of blank PROMs in stock, and program them at the last minute to avoid large volume commitment. These types of memories are frequently used in microcontrollers, video game console mobile phones, radio-frequency identification (RFID) tags, implantable medical devices, high-definition multimedia interfaces (HDMI) and in many other consumer and automotive electronics products.

EEPROM:-

EEPROM (also called E2PROM) stands for electrically erasable programmable read-only memory and is a type of non- volatile memory used in computers, usually integrated in microcontrollers such as smart cards and remote keyless systems, or as a separate chip device to store relatively small amounts of data by allowing individual bytes to be erased and reprogrammed.

EEPROMs are organized as arrays of floating gate transistors. EEPROMs can be programmed and erased in-circuit, by applying special programming signals. Originally, EEPROMs were limited to single-byte operations, which made them slower, but modern EEPROMs allow multi-byte page operations. An EEPROM has a limited life for erasing and reprogramming, now reaching a million operations in modern EEPROMs. In an EEPROM that is frequently reprogrammed, the life of the EEPROM is an important design consideration.

Flash Memory is a type of EEPROM designed for high speed and high density, at the expense of large erase blocks (typically 512 bytes or larger) and limited number of write cycles (often 10,000). There is no clear boundary dividing the two, but the term “EEPROM” is generally used to describe non-volatile memory with small erase blocks (as small as one byte) and a long lifetime (typically 1,000,000 cycles). Many past microcontrollers included both (flash memory for

the firmware and a small EEPROM for parameters), though the trend with modern microcontrollers is to emulate EEPROM using flash.

As of 2020, flash memory costs much less than byte-programmable EEPROM and is the dominant memory type wherever a system requires a significant amount of non-volatile solid state storage. EEPROMs, however, are still used on applications that only require small amounts of storage, like in serial presence detect .

Programmable component is a MOS transistor

– Transistor has “floating” gate surrounded by an insulator

(a) Negative charges form a channel between source and drain storing a logic

(b) Large positive voltage at gate causes negative charges to move out of channel and get trapped in floating gate storing a logic 0

© (Erase) Shining UV rays on surface of floating-gate causes negative charges to return to channel from floating gate restoring the logic 1

(d) An EPROM package showing quartz window through which UV light can pass

Flash Memory:-

Flash memory is a type of electrically erasable programmable read-only memory [EEPROM] chip that can be used for the transfer and permanent storage of digital data. It is actually a long-term persistent storage computer storage device that can be electrically erased and reprogrammed.

Working :-

In this device, the information is stored as an array of floating gate transistors called cells. Each of these cells can store only one bit of information at a time. The design of each memory cell is somewhat similar to that of a MOSFET. The only difference is that this cell has two gates. The gate on top is called the control gate [CG], and the bottom one is called the floating gate [FG]. FG may be made of conductive materials like poly silicon or can also be non-conductive. These two gates are separated from each other by a thin oxide layer. To know the exact representation, take a look the figure given below.

Memory architecture

Memory architecture describes the methods used to implement electronic computer data storage in a manner that is a combination of the fastest, most reliable, most durable, and least expensive way to store and retrieve information. Depending on the specific application, a compromise of one of these requirements may be necessary in order to improve another requirement. Memory architecture also explains how binary digits are converted into electric signals and then stored in the memory cells. And also the structure of a memory cell.

The total memory capacity of a computer can be visualized by hierarchy of components. The memory hierarchy system consists of all storage devices contained in a computer system from the slow Auxiliary Memory to fast Main Memory and to smaller Cache memory. Auxiliary memory access time is generally 1000 times that of the main memory, hence it is at the bottom of the hierarchy. The main memory occupies the central position because it is equipped to communicate directly with the CPU and with auxiliary memory devices through Input/output processor (I/O). When the program not residing in main memory is needed by the CPU, they are brought in from auxiliary memory. Programs not currently needed in main memory are transferred into auxiliary memory to provide space in main memory for other programs that are currently in use. The cache memory is used to store program data which is currently being executed in the CPU. Approximate access time ratio between cache memory and main memory is about 1 to 7~10

Architecture

RAM:- The RAM integrated circuit chips are further classified into two possible operating modes, static and dynamic. The primary compositions of a static RAM are flip-flops that store the binary information. The nature of the stored information is volatile, i.e. it remains valid as long as power is applied to the system. The static RAM is easy to use and takes less time performing read and write operations as compared to dynamic RAM. The dynamic RAM exhibits the binary information in the form of electric charges that are applied to capacitors. The capacitors are integrated inside the chip by MOS transistors. The dynamic RAM consumes less power and provides large storage capacity in a single memory chip. RAM chips are available in a variety of sizes and are used as per the system requirement. The following block diagram demonstrates the chip interconnection in a 128 * 8 RAM chip.

· A 128 * 8 RAM chip has a memory capacity of 128 words of eight bits (one byte) per word. This requires a 7-bit address and an 8-bit bidirectional data bus.

· The 8-bit bidirectional data bus allows the transfer of data either from memory to CPU during a read operation or

from CPU to memory during a write operation.

· The read and write inputs specify the memory operation, and the two chip select (CS) control inputs are for enabling the chip only when the microprocessor selects it.

· The bidirectional data bus is constructed using three-state buffers.

· The output generated by three-state buffers can be placed in one of the three possible states which include a signal equivalent to logic 1, a signal equal to logic 0, or a high-impedance state.

ROM:-

The primary component of the main memory is RAM integrated circuit chips, but a portion of memory may be constructed with ROM chips. A ROM memory is used for keeping programs and data that are permanently resident in the computer.

Apart from the permanent storage of data, the ROM portion of main memory is needed for storing an initial program called a bootstrap loader. The primary function of the bootstrap loader program is to start the computer software operating when power is turned on. ROM chips are also available in a variety of sizes and are also used as per the system requirement. The following block diagram demonstrates the chip interconnection in a 512 * 8 ROM chip.

· A ROM chip has a similar organization as a RAM chip. However, a ROM can only perform read operation; the data bus can only operate in an output mode.

· The 9-bit address lines in the ROM chip specify any one of the 512 bytes stored in it.

· The value for chip select 1 and chip select 2 must be 1 and 0 for the unit to operate. Otherwise, the data bus is said to be in a high-impedance state.

Authors:

Rushikesh Amol Kale

Vedant Vikram Sabde

Ajinkya Sathe

--

--