To make you know better about the differences between RAM and ROM, today, our EmbedIC team will introduce basically what are they and their role in the memory. Let's get started.
Memory is used to store and read and write a large amount of binary data. There are two corresponding concepts: read-only memory (ROM) and random access memory (RAM), which can only be read but not written; RAM can be both read and written. After a power failure, all the data saved in RAM will be lost, while the data in ROM can be saved for a long time.
The internal structure of memory is basically the same, generally consisting of memory array, address decoder and output control circuit. The circuits outside the memory array are called Periphery.
Memory array is the core area of memory, it has many memory cells, each memory cell stores one bit of binary data. A set of data is read out one at a time and is called a set of words. The number of bits contained in a word is called the word length (Bit).
In order to distinguish between different words, each word is given a number, called an address, and the address code is translated by the decoder. The number of address cells is the number of words (Depth), expressed as N, with a value of 2n, n being the number of bits of the address code.
In practice, we often use the product of the number of words (Depth) and word length (Bit) to express the capacity of memory. The ROM in the figure below has a capacity of 28 X 1, with 256 words and a word length of 1 bit, for a total of 256 memory cells.
RAM (Random Access Memory) refers to the memory where the contents can be written or read out quickly and the contents are lost after power failure.
RAM can be divided into two types: SRAM (static random memory) and DRAM (dynamic random memory).
Further Reading: SRAM vs DRAM, the Differences and How to Choose 2022
The advantage of SRAM is, as long as the device is not powered down, the memory content will not be lost, no refresh circuit is needed, and the working speed is fast. The disadvantages are low integration, high power consumption and high price.
The diagram above shows a typical SRAM structure where each memory cell consists of six MOS tubes, the middle four MOS tubes form a bistable flip-flop, and the switching states of the two MOS tubes (Q1, Q1') on both sides are controlled by the same selection signal CE.
When data is written, the data signal D and its inverted signal D# appear on Q1 and Q1' respectively. After the selection signal CE turns Q1 and Q1' on, D and D# trigger the bistable flip-flop, causing the corresponding flip-flop state to be retained until the next data writing event.
When the data is read out, after the selection signal CE is valid and makes Q1 and Q1' conductive, the logic states of A and A' points appear on the data signals D and D#, so that the data can be read, and the process of reading does not change the state of the bistable flip-flop in the memory cell.
Each SRAM memory cell consists of six MOS tubes with high power consumption and low integration, but due to the internal bistable flip-flop, it is also not necessary to constantly refresh the internal memory content.
Therefore, SRAM has a small capacity in electronic products and is often used in very demanding places, such as CPU cache.
The advantages of DRAM are high integration, low power consumption and low price.
The disadvantage is that even if the device is not powered down, the memory content can only be maintained for a short period of time and needs to be refreshed continuously.
A typical DRAM architecture diagram is as follows.
Each memory cell consists of a MOS tube and its parasitic capacitor. Since the state of the data signal is determined by the charge of the capacitor, the capacitor needs to be refreshed by charging and discharging every once in a while.
DRAM is usually used to make memory with high capacity requirements but relatively low speed requirements, such as computer memory sticks.
There are many kinds of DRAM, such as FPRAM/FastPage, EDORAM, SDRAM, DDR RAM, RDRAM, SGRAM and WRAM, etc.
ROM is the abbreviation of Read-Only Memory, a solid-state semiconductor memory that can only read out the data stored in advance. Its characteristic is that once data is stored, it cannot be changed or deleted. It is usually used in electronic or computer systems that do not require frequent data changes, and the data does not disappear when the power is turned off.
For ease of use and mass production, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), and electrically erasable programmable read-only memory (EEPROM) were further developed. For example, the boot-up program (operating system) of early personal computers such as the Apple II or IBM PC XT/AT or the firmware in various other microcomputer systems.
EPROMs were not easy to use and unstable because they needed to be erased by UV light, and in the 1980s, EEPROMs were developed to overcome the shortcomings of EPROMs, but they were not well integrated and expensive. A new type of flash memory with a similar memory cell structure to EPROM was developed. Its high integration, low power consumption, small size, and the ability to quickly erase online, thus gaining rapid development, and may replace the existing hard disk and floppy disk to become the main mass storage media. Most read-only memories are made with metal-oxide-semiconductor (MOS) field-effect tubes.
There are many kinds of ROMs, and Mask-ROM is what engineers call read-only memory, where the data cannot be changed after it is solidified.
Initially, people called ROM (Read Only Memory) as read only memory, and data is not lost after power failure. Since it could not be rewritten, it was very inconvenient to use. With the advancement of technology, some new technologies are used in ROM to make it programmable.
PROMs are programmable ROMs, but PROMs are disposable, which means that they cannot be modified after software is poured into them. As time went on, it became clear that such functionality was not enough.
Then came EPROMs, which were erased by ultraviolet light and programmed by high voltage, and these ROMs usually had a clear quartz glass window on top.
EPROMs can be programmed by erasing the original program with UV light, and are a kind of general-purpose memory.
EEPROMs are electronically erasable, expensive, take a long time to write, and are very slow to write.
In fact, by nature, their function has been somewhat different from the name of ROM (read-only), but there are probably several reasons why they are still called ROMs:
Erasable Programmable Read Only Memory (EPROM) can be programmed to write data using high voltage, and when erased by exposing the line to UV light, the data can be cleared and reused. A quartz transparent window is usually reserved on the package housing to facilitate exposure.
1. Advantages of EPROM
2. Disadvantages of EPROM
Electrically Erasable Programmable Read Only Memory (or E2PROM) operates similarly to EPROM. However, the erasure is done by using a high electric field, so there is no need for a transparent window. It can be divided into serial type and parallel type.
The difference from FLASH is that FLASH needs to be erased one by one, while EEPROM can be erased "bit by bit".
The communication ports of individual EEPROM components are usually classified as serial or parallel. In addition to the power line, the serial port uses only one to four wires to transmit signals, requiring fewer pins than the parallel type, and is usually used to store data. The running program is usually placed in the parallel EEPROM for easy access.
1.EEPROM multi-byte read/write operation timing
Reading EEPROM data is easy, the EEPROM sends the data directly according to the timing we send, but writing EEPROM data is not so easy. After sending data to the EEPROM, it is first stored in the EEPROM cache, and the EEPROM must move the data in the cache to a "non-volatile" area in order to achieve the effect of no data loss when power is lost.
During the process of writing to the non-volatile area, the EEPROM will not respond to our accesses, not only will it not receive our data, but the EEPROM will not respond when we address it using the IIC standard addressing mode, as if there is no such device on the bus. After the data is written to the non-volatile area, the EEPROM is back to normal again and can read and write data normally.
2. Major manufacturers of EEPROMs
ON Semiconductor, Maxis, NXP, Huabang Electronics, etc.
(1) UV can erase EPROM, while electrical signal can erase EEPROM.
(2) Both EPROM and EEPROM are used in the lower layers of hardware or operating systems associated with external programming.
(3) The power consumption of the EPROM transistor is about 12.5, while the power consumption of the EEPROM transistor is 5 volts.
(4) EPROMs are programmed using electronic injection programming techniques, while EEPROMs are programmed using tunneling effect techniques.
(5) EPROM erase operations can take 15 to 20 minutes, while EEPROM erase operations take only 5 milliseconds, which is much faster than EPROM.
(6) The EPROM should be removed from the computer circuit or motherboard for erasing and reprogramming, and the EEPROM can be erased within the computer circuit and motherboard without removing it.
Purpose: RAM (Random Access Memory) is a type of computer memory that is used to temporarily store data that the computer is actively using. ROM (Read-Only Memory), on the other hand, is a type of memory that is used to permanently store data that the computer needs to boot up and operate.
Volatility: RAM is volatile, which means that the data stored in RAM is lost when the computer is turned off or when the power supply is interrupted. ROM is non-volatile, which means that the data stored in ROM is retained even when the power supply is turned off.
Read/Write Access: RAM is read-write memory, which means that data can be read from and written to RAM. ROM, on the other hand, is read-only memory, which means that data can only be read from ROM and cannot be written to it.
Capacity: RAM typically has a much larger capacity than ROM. The amount of RAM in a computer can range from a few gigabytes to several terabytes, while ROM is usually measured in megabytes.
Speed: RAM is generally faster than ROM. Data can be accessed from RAM much more quickly than from ROM, which makes it better suited for storing data that needs to be accessed frequently.
Types: There are different types of RAM, including SRAM (Static RAM) and DRAM (Dynamic RAM). Similarly, there are different types of ROM, including PROM (Programmable ROM), EPROM (Erasable Programmable ROM), and EEPROM (Electrically Erasable Programmable ROM).
In summary, RAM is used to store data temporarily, is volatile and can be read from and written to, has a larger capacity, and is faster than ROM. ROM is used to store data permanently, is non-volatile and can only be read from, has a smaller capacity, and is slower than RAM.
RAM, volatile random access memory, high speed access, equal read and write time, and independent of address, such as computer memory, etc.
ROM, read-only memory. Information is not lost after power failure, such as the BIOS chip used for computer startup. Access speed is very low, (compared to RAM) and can not be rewritten. Since information cannot be rewritten and cannot be upgraded, it is rarely used now.
ROM is rarely used as a standalone chip at this stage, but it was first used in Chinese character databases, game cards, etc. Nowadays, it is basically in the form of IP embedded in the chip.
EPROM, EEPROM, and Flash ROM (NOR Flash and NAND Flash) have the same performance as ROM, but can be rewritten. Generally read out is faster than write, and write requires higher voltage than read out (read 5V write 12V). Flash, on the other hand, can read and write at the same voltage, and has a large capacity and low cost, and is now widely used in USB flash drives and MP3s.
In computer systems, RAM is generally used as memory, and ROM is used to store some hardware drivers, i.e. firmware.
IC MCU 8BIT 28KB FLASH 64QFN
Product Categories: 8bit MCU
Manufacturer: Texas Instruments
IC DSP FIXED/FLOAT POINT 256BGA
Product Categories: DSP
Manufacturer: Texas Instruments
IC DSP/ARM PROCESSOR 1031FCBGA
Product Categories: DSP
Manufacturer: Texas Instruments
IC DSP FIX/FLOAT POINT 176HLQFP
Product Categories: DSP
Looking forward to your comment