【正文】
it is clear that it should be instead of thinking first of all the ponents for puting, which is the calculator。 34. Now to carry out operations, first of all need a plan, followed by Pen and paper. We have to calculate the issue of record, and then count the first step, 163 156, add it with the results of 36 recorded in the paper, and then calculate 166 247。 fourth step: End the sum of the results to the specified memory unit. All of these take a number, send a few, the sum of deposit, etc. are a few operations (Operation), we asked the puter to operate with the implementation of the various forms of writing down the order, which is instruction. But how can we identify them and to perform these operations? This is a single chip in the design by the designers of the instruction given to it by decision. A mand, corresponding to a basic operation。s designated address, the corresponding unit from the ROM mand byte out of storage on the instruction register, and then, in the instruction register decoder instruction code has been translated into various forms of control signals, these signals with a single Machine clock oscillator clock pulse generated in the timing and control circuit in bination to form a certain period of time according to changes in level and beat the clock, the socalled control of information, internal coordination in the CPU data transfer between registers, and other puting operation. A program memory Control puter program is a series of action mands, singlechip only recognized by the 0 and 1 consisting of machine code instructions. Such as the preparation of the foregoing order by Mnemonic MOV A, 20H, understanding the code into the machine 74H, 20H: (written in binary is 01110100B and 00100000B). Deal with problems in the singlechip will be required before good procedures, tables, constants piled into machine code into the microcontroller memory, the memory as the program memory. Program memory can be put on the chip or chip, chipchip can also be set at the same time. As the PC program counter for 16bit, the program memory 16bit binary address can be used, therefore, the largest internal and external memory addresses from 0000H to FFFFH. 8051 there are 4k bytes of ROM, on the occupied by the 0000H ~ 0FFFH minimum 4k bytes, this chip to expand the program memory address 1000H numbers should be started, if you use 8051 as a 8031, do not want to use chip 4kROM , all bychip memory, the address number can be started by the 0000H. However, this should be the first 8051 feet (31) (that is, EA feet) remain low. When EA is high, the user 0FFFH in the range of 0000H to use the internal ROM, more than 0FFFH, the singlechip CPU access to external program memory automatically. Second, data storage Singlechip data memory RAM memory by reading and writing ponents. Its maximum capacity can be expanded to 64k, used to store realtime data input. 8051 there are 256 units of the internal data memory, in which 00H ~ 7FH for internal random access memory RAM, 80H ~ FFH register for the special zone. Actual use should be the first full use of internal memory, from the use of perspective, to understand the structure of internal data memory and address of the distribution is very important. Because the future directions in the study design of systems and procedures they will be frequently used. 8051 internal data memory address 00H to FFH by a total of 256 bytes of address space, the space was divided into two parts, of which the internal data RAM address 00H ~ 7FH (that is, 0 ~ 127). The Special Function Registers used as the address of 80H ~ FFH. 256 bytes in this also opened up a socalled digital address area, the region can not only byte addressing, but also by the bit (bit) addressable. For those who require databit operation can be stored to the region. From 00H to 1FH arranged the work of four groups of registers, each occupied by 8byte RAM, recorded as R0 ~ R7. Whether the choice of which set of registers, register by the aforementioned signs of RS1 and RS0 to choose. Add in the two different binary number, you can choose different groups of r