Basic methods of data exchange
Between the microprocessor and the external device (VU), useful information is exchanged as data words (Data Word - DW) and service information in the form of control words (Control Word - CW) and status words (Status Word - SW). The service information can take up a considerable amount, so in general, a number of I/O ports (VVs) forming the access space to the VU are allocated for its exchange. Input and output are always considered in relation to the microprocessor. The exchange of information between the microprocessor and the VU is carried out according to certain rules. A set of rules, called the protocol of litter, is the basis for compiling the VU driver. The driver is a set of subroutines that support the exchange of the VU with a microprocessor.
There are three ways to exchange data: software-controlled exchange, exchange with program interruption and exchange over a channel for direct memory access. Let's consider in general features of each of them.
Software-Managed Data Exchange
This exchange is initiated and executed by the microprocessor using:
• special I/O commands, while the command format must contain the code of the operation to be performed and the number (address) of the selected port of the VU;
• commands for accessing RAM, each port of the VU being treated as an address other than the addresses of other memory cells.
From the point of view of using auxiliary signals, we distinguish:
• direct, or unconditional, exchange (input-output), in which no conditions and auxiliary signals are required to activate the exchange. Such an exchange is possible only with devices that are always ready for exchange. It is an integral part of more complex ways (protocols) of exchange.
• conditional exchange, at which the exchange activation is possible when the condition for readiness for the exchange of VUs is met.
Most VUs work asynchronously with respect to the microprocessor. In an asynchronous exchange of information, an important task is to check the readiness of the VU. Therefore, the VU must have hardware to generate information about its internal state.
The microprocessor reads this information, passes it to the battery, analyzes it and, based on the analysis, makes a decision about the readiness of the VU. If the VU is not ready, the microprocessor goes into a waiting state. If a ready state is detected, data transfer operations are performed. In this way, the time is interfaced between the operation of the microprocessor and those VUs that are inferior to it in terms of speed.
Thus, conditional I/O is used to exchange with low-speed VUs and is accompanied by a ready signal (GtVV) generated by the VU. The GTV signal is input into the microprocessor as part of the status word and informs it of the readiness of the VU to be exchanged. After completion of the exchange operation, the GTVV signal must be removed and set before the new operation. To do this, the microprocessor informs the VU about the end of the operation with the help of a confirmation signal (PtMn). In Fig. Figure 5.15 shows the conditional BB charts using the exchange controller. In this case, the signals of the GtMp or the controller and the FT-signal can also be used.
When entering (Figure 5.15, a) the processes proceed in the following sequence:
• If the signal ПтMп = 0, then the external device sets new data on the bus ВУ (ШВУ) and the signal ГтВУ = 1;
• Since GtVU = 1, the microprocessor gives the command to enter data and the data on the SD come into the accumulator;
• the microprocessor, through the controller, sets the confirmation signal PtMn = 1, notifying the VU that the data has been entered;
• With ПтМп = 1, the external device removes the signal ГтВУ = 0;
• At ГтВУ = 0 the microprocessor removes the signal ПтМп = 0.
Fig. 5.15. Conditional input (a) and output (b)
In the output of the data (Figure 5.16, b) the processes proceed in the following sequence:
• If the signal TmMn = 0, the VU performs a reset of the signal ПтВУ = 0, after which the microprocessor puts new data on the SD;
• with the confirmation signal ПтВУ = 0, the microprocessor sets the signal ГтМп = 1;
• the data on the TST are entered in the ST;
• for TmMn = 1, the VV removes the signal ПтВУ = 0;
• With ПтВУ = 1, the microprocessor removes the previously set signal ГтМп = 0.
The exchange protocol considered is called acknowledgment.
There are two types of conditional exchange: with a cycle and combined. With exchange with the cycle (Fig. 5.16, a) in case of unavailability of the CPU, the microprocessor switches in the standby mode; at combined exchange (Figure 5.16 , 6) after polling the VU, the microprocessor returns to the main program execution.
The method of encoding distinguishes between data exchange in parallel and sequential codes. The need for data transfer in the serial code is due to two factors:
• the presence of a VU (for example, a keyboard, display, teletype), the principle of which is based on the use of sequential code;
Fig. 5.16. Exchange with cycle engagement (a) and combined exchange (b)
• removing the TS from the computer for a considerable distance, as the length of the connecting line between the information source and receiver increases, the capacity between its individual conductors increases. Therefore, in the transmission of impulse signals along one conductor, interference is induced in other conductors, the level of which can be commensurate with the level of useful signals.
In these conditions, the information exchange between the microprocessor and the VU is carried out via a two-wire line and is accompanied by the transformation of the parallel data format into a serial data format and a serial format into a parallel format - when data is entered. These functions are assigned to the exchange controller, which is usually performed in the form of an integrated circuit.
The advantages of software-controlled data exchange are its simplicity, and the drawbacks are a waste of time waiting for the readiness of the VU and the inability to provide a timely response to the sudden need for the VU in the exchange of information.
Also We Can Offer!
- Argumentative essay
- Best college essays
- Buy custom essays online
- Buy essay online
- Cheap essay
- Cheap essay writing service
- Cheap writing service
- College essay
- College essay introduction
- College essay writing service
- Compare and contrast essay
- Custom essay
- Custom essay writing service
- Custom essays writing services
- Death penalty essay
- Do my essay
- Essay about love
- Essay about yourself
- Essay help
- Essay writing help
- Essay writing service reviews
- Essays online
- Fast food essay
- George orwell essays
- Human rights essay
- Narrative essay
- Pay to write essay
- Personal essay for college
- Personal narrative essay
- Persuasive writing
- Write my essay
- Write my essay for me cheap
- Writing a scholarship essay