Monolithic microcomputer Internal structure analysis: In order to know how the delay program is working, we must first understand some of the symbols appearing in the delay program, starting from R1, R1 is called the work register. What is a work register? let's look for answers in real life. If a math problem: 123+567, let you answer the result is how much, you will immediately answer is 690, and then see the following topic: 123+567+562, to let you have to answer, it is not so easy? What are we going to do about it? If there is a piece of paper, it is not difficult, we first calculate 123+567=690, write 690 on paper, and then calculate 690+562 get the result is 1252. This 1252 is the result we want, and 690 is not the result we want, but in order to get the final result, we have to figure out 690, and note that this is actually an intermediate result, the computer does the operation and this similar, in order to get the final result, generally do many steps of intermediate results, There's a place to put these intermediate results, where do you put them? can you put it in the Rom you mentioned earlier? Obviously not, because the computer to write the results in, and ROM is not writable, so in the microcontroller there is another area called the Ram area (RAM is the abbreviation of random access memory), it can write data in. In particular, in the MCS-51 microcontroller, the ram is divided into a region, called the work of the storage area, the above program used by the R6,R7 is in this area.
Single chip microcomputer parallel I/O port