Menu

What are the technical characteristics of the buffer?

Author: Release time: 2024-09-24 08:31:19 View number: 13

Buffer, also known as buffer register, is a kind of integrated circuit products, which is divided into input buffer and output buffer. The function of the former is to temporarily store the data sent by the peripheral so that the processor can take it away; The latter is used to temporarily store the data sent by the processor to peripherals.

 

Data buffer register this is a special register for serial port that can be directly addressed. A friend asked, "why do you only use the same register SBUF in the serial port transceiver? Instead of using one register for each transceiver." In fact, SBUF contains two independent registers, one is send register, the other is receive register, but they all use the same address - 99H.

 

In the design of CPU, the DC load capacity of the general output line can drive a TTL load, while in the connection, an address line or data line of the CPU may be connected to multiple memory chips, but now the memory chips are MOS circuits, mainly capacitive loads, and the DC load is far less than the TTL load. Therefore, in a small system, the CPU can be directly connected to the memory, and in a large system, a buffer needs to be added.

 

The CPU will point to the receiving register when reading SBUF and the sending register when writing, and the receiving register is a double buffer register, which can avoid the problem of data overlap caused by the receiving interrupt not being responded in time, the data not being taken away, and the data of the next frame has arrived. The transmitter does not need to use double buffering. Generally, we do not need to use the transmission interrupt to process the transmission data when writing the transmission program.

 

The method of operating SBUF register is very simple. As long as the 99H address is defined as a variable with the keyword SFR, it can be read and written, such as SFR SBUF = 0x99; Of course, you can also use other names. It is usually defined in the standard reg51.h or at89x51.h header files, as long as it is referenced with \include.