Memory is one of the important hardware of computer. There are two types of memory structure of single chip microcomputer
: one is that program memory and data memory are uniformly addressed, which belongs to Princeton structure, and the other is Harvard structure in which program memory and data memory are separately addressed. MCS-51 adopts Harvard structure.
1. Characteristics of
memory Program memory and data memory are completely separated, each with its own addressing system, control signal and specific function. Program memory only stores programs and constants that must be retained at all times, and data memory is usually used to store a large amount of data required for program operation.
The names related to memory in single chip microcomputer are: program memory and data memory, internal memory and external memory, byte address and bit address. The memory has a certain capacity, and an 8-bit binary number is often used as the basic unit, which is called a byte. The memory has many byte units, which are also identified by binary numbers, called addresses. Most of the addresses of these memory spaces are addressed from zero. 8-bit address 00H ~ FFH, 16-bit address 0000H ~ FFFFH. Since each hexadecimal digit can be directly converted into a four-bit binary digit (such as 0H-0000B, 9H-1001B, FH-1111B, where H represents the hexadecimal digit identifier and B represents the binary digit identifier), we will also refer to two hexadecimal digits as 8-bit binary digits in the future.
The working register is composed of RAM, and the I/O interface also works in memory mode. The working register, I/O port latch and data memory RAM are uniformly addressed in the microcontroller.
It has a powerful Boolean processor with 256 addressable bits.
2. The memory addressing space of MCS-51
The register structure of MCS-51 microcontroller is shown in the figure. There are six addressing spaces and four physical memory spaces:
① The on-chip 4K (0000H-0FFFH) program memory with PC as the address pointer.
② The off-chip 4K+60K (0000H-FFFFH) program memory.
③ 64K data memory outside the chip with data pointer as address.
④ 128 bytes RAM (00H-7FH) and special function register (80H-FFH) with 8-bit address inside the chip.
Program memory, 4K program memory space inside the chip, its address is 0000H ~ 0FFFH, and the external EPROM is also addressed from 0000H. In the address range of 0000H ~ 0FFFH, the address overlaps, and the selection of internal and external program memory is controlled by the EA pin signal.
When EA = 0, regardless of the size of the PC value, the CPU always accesses the external program memory. For the 8031 chip, there is no program memory inside, and an external EPROM must be connected, so EA must be grounded, that is, when EA = 0. The external program memory is addressed from 0000H, and the addressing range is 64K. When EA = 1, the internal 4K program is executed first, and then the external program is executed after 4K is full.
The program memory uses the 16-bit program counter PC as the address pointer to address a 64K byte space range. PSEN is used as the read select signal of the program memory.
The program memory also stores constants required by the program. The microcontroller uses different instruction forms to distinguish whether it is accessing the program memory or the data memory. Whenever data is taken from the constant table of the program memory, the table lookup instruction MOVC form must be used.
Previous article:Introduction to Microcontrollers
Next article:What is the difference between CPU and microcontroller?
Recommended ReadingLatest update time:2024-11-17 03:05
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- FAQ_How to implement low power mode and low power wake-up function in 24G private protocol applications
- Please help. How to determine the absolute value of expert control PID adjustment?
- TI C2000 series microcontroller program stack usage
- The troubles of capacitor testers in traditional mode - Part 2
- 【GD32E231_DIY】-05: HMI program architecture
- Problem calling EPwm1Regs.TBCTR value
- [Rawpixel RVB2601 development board trial experience] 4. General hardware timer test
- Ask a question about Verilog
- Share MODBUS examples based on MSP430
- EEWORLD University Hall--Overview of Hall Position Sensor Applications