Function introduction
1. Data storage
1. The n8051 microcontroller data memory is used to temporarily store data and operation results generated during program execution.
2. The n8051 microcontroller data memory can also be divided into on-chip data memory and off-chip data memory. When the on-chip data memory is not enough, the off-chip data memory can be expanded. Under normal circumstances, the capacity of off-chip data memory does not exceed 64KB. Different from the internal and external program memories, the internal and external data memory spaces overlap (the address range of the internal RAM is 00H~07FH, and the address range of the external RAM is 0000H~0FFFFH), which are distinguished by different instructions. When accessing internal RAM, use MOV class instructions; when accessing external RAM, use MOVX class instructions, so address overlap will not cause operational confusion.
3. The internal data memory space of n8051 microcontroller totals 128 bytes, occupying the address range of 00H~7FH. The special function register area is also 128 bytes, occupying the space from 80H to 0FFH.
4.n On-chip data memory is divided into three parts: working register area, bit-addressable area, and general RAM area
2. Special function register
1.n Special function register (SFR) is also called a special-purpose register. The special function register reflects the operating status of the 51 microcontroller. Many functions are also defined and controlled through special function registers
2.n There are 21 special function registers set in the 8051 microcontroller, which are discontinuously distributed in the 128-byte storage space with addresses 80H-FFH
3.n Among these 21 SFRs, all 11 units whose byte address can be evenly divided by 8 (that is, the hexadecimal address code ends with 0 or 8) have bit addressing capabilities. There are 82 valid bit addresses in total. . Table 3-3 is a list of special function register distribution
4.n82 valid bit addresses can be represented by four methods: bit address, bit symbol, unit address.bit sequence and register name.bit sequence, but it is generally represented by bit symbol or register name.bit sequence.
3. 51 microcontroller command system
The concept of instructions and command systems
The n instruction is an operation performed internally by the computer and is a command provided to the user for programming. Determined by the characteristics of the electronic devices that make up the computer, the computer can only recognize binary codes. A language that uses binary code to describe instruction functions is called machine language. Since machine language is inconvenient for people to recognize, remember, understand and use, each machine language instruction is given a mnemonic symbol to represent it, which forms assembly language. In other words, assembly language is an instruction form that is easy for people to identify, remember, understand and use. It corresponds to machine language instructions one-to-one and is also determined by the hardware characteristics of the computer.
There are two description forms of n instructions: machine language form and assembly language form. Nowadays, assembly language is mainly used to describe computer instruction systems and practical applications. A program written in machine language is called a target program. Programs written in assembly language are called source programs. Computers can directly recognize and execute only machine language. Assembly language programs cannot be directly recognized and executed by the computer. They must be translated into machine language programs through an intermediate link. This intermediate process is called assembly. There are two ways of assembly: machine assembly and manual assembly. Machine assembly uses a special assembly program to translate on the computer; manual assembly is when programmers translate assembly language instructions into machine language instructions one by one. Nowadays, machine assembly is mainly used, but sometimes manual assembly is also used.
Change log
1. Major improvements have been made in window management, project management and source file editing tools.
2. All windows in the WAVE6000 environment can be placed in the same area of the window, and each window can be switched directly, saving the window area and making window management more effective.
3. The functions of project management and source file editing have been enhanced, making it easier to switch projects and files. The effective back and forward functions make it more convenient to modify the program.
4. The newly added bookmark window and breakpoint window can effectively manage breakpoints and bookmarks, so that programmers do not need to query line by line in numerous codes and breakpoints. Breakpoint information and bookmark information are displayed in their respective windows at a glance.
it works
it works
it works