I/O Organization John D. Carpinelli, All Rights Reserved 1

Size: px
Start display at page:

Download "I/O Organization John D. Carpinelli, All Rights Reserved 1"

Transcription

1 I/O Organization 1997 John D. Carpinelli, All Rights Reserved 1

2 Outline I/O interfacing Asynchronous data transfer Interrupt driven I/O DMA transfers I/O processors Serial communications 1997 John D. Carpinelli, All Rights Reserved 2 A CPU that cannot interact with the outside world is basically useless. This module examines input/output organization of computer systems. We begin by examining I/O interfacing, or the connection between I/O devices and the CPU. We then study asynchronous data transfers. This concept is used to transfer data between devices. For example, transferring data via modem is an asynchronous data transfer. Next we describe the types of input/output and how they are prioritized. Sometimes it is preferable to bypass the CPU when performing I/O transfers. Direct Memory Access, or DMA, and I/O processors are two devices used to accomplish this. We also examine serial communications. Finally, concluding remarks are presented.

3 I/O interfacing See figure 11.1, p. 386 of the textbook John D. Carpinelli, All Rights Reserved 3 This figure shows how generic I/O devices are interfaced to a CPU. An interface block sits between the CPU and an individual I/O port. This interface consists of combinatorial logic which recognizes when the correct address and control signals are present. It may also contain latches and/or tri-state buffers to receive data and to isolate the I/O device from the bus. For example, consider an I/O device not shown in this figure, a mouse. If the mouse is connected as an input-only device at port address 3F8H (a commonly-used address for serial ports on the PC), the interface might enable a buffer which allows data to pass from the mouse to the CPU when the address lines are set to and the CPU is performing an I/O read operation.

4 I/O commands Control commands Status commands Data output command Data input command 1997 John D. Carpinelli, All Rights Reserved 4 When dealing with I/O devices, it is useful to consider all interaction as taking place via I/O commands. In fact, there are I/O interface chips, or I/O controllers, designed to coordinate transfers via I/O commands. These commands fall into four distinct categories. Control commands cause the I/O device to do something other than transfer data. A typical control command might cause a disk drive to position its head over a specific track or to move its head one step in a given direction. The status commands request non-data information from the I/O device, such as whether the device is ready to transfer data or the setting of some hardware parameters. The remaining commands transfer data. Data output commands transfer data from the bus to the I/O interface, which in turn transfers it to the I/O device. Data input commands do just the opposite, moving data from the I/O device to the bus via the I/O interface. Writing data to and reading data from a disk is a common example of when these commands would be used.

5 Types of I/O Isolated I/O Separate address space Separate control lines and instructions Memory-mapped I/O I/O ports treated as memory locations Same address space, control lines and instructions as used for memory access 1997 John D. Carpinelli, All Rights Reserved 5 CPUs implement I/O in one of two ways. In isolated I/O, each I/O device has a unique address that is separate from the memory addresses used by the system. There are separate control lines to distinguish between I/O transfers and memory transfers, as well as separate instructions to access I/O ports. Memory-mapped I/O treats each I/O port as a memory location. As such, the same address space and control lines are used to access an I/O port as are used to access a memory location. The same instructions are used to access both.

6 Asynchronous data transfer Strobe: a pulse supplied to indicate the time at which data is being transmitted Handshaking: a control signal is transmitted along with the data; another signal is sent by the receiver 1997 John D. Carpinelli, All Rights Reserved 6 Asynchronous data communication is used when transmitting data between two devices which cannot share a common clock. For example, data transmitted via modem would be sent asynchronously, whereas data transmitted within a single computer would be transmitted synchronously. A strobe is a pulse used by one computer to alert the other that it will send data. In some systems, the receiving unit sends an acknowledge signal back to the sender. This is handshaking.

7 Source-initiated strobe SOURCE UNIT Data bus Strobe DESTINATION UNIT Data Strobe Valid data 1997 John D. Carpinelli, All Rights Reserved 7 There are four general methods for transmitting data asynchronously, depending on whether the source or destination initiates the transfer and on whether or not handshaking is used. In source-initiated strobe, the source first places data onto the data bus. After giving it some time to settle down, it activates the strobe signal. This alerts the destination device that data is ready and the destination device reads in the data. After some set amount of time, the source unit de-asserts the strobe and then removes data from the bus. Some devices may load in data on the falling edge of the strobe, so the order of the last two operations is important. Note that the source device never receives confirmation that the data was received successfully. That is a tradeoff inherent in this type of transfer. The advantage gained is that hardware requirements are reduced. This type of transfer could be useful for such operations as updating remote LED displays.

8 Destination-initiated strobe SOURCE UNIT Data bus Strobe DESTINATION UNIT Data Strobe Valid data 1997 John D. Carpinelli, All Rights Reserved 8 Destination-initiated strobe is similar to source-initiated strobe except, as its name implies, the destination device initiates the data transfer by asserting the strobe. This causes data to be placed on the data bus; the destination device then reads in the data. After some preset amount of time, it releases the strobe, which signals the source unit to stop sending valid data. A circuit that uses this form of transmission might have a tri-state buffer as part of the source unit. The data from the source unit is input to the tri-sate buffer. The output of the buffer is connected to the data bus. The strobe is connected to the buffer enable. As with the source-initiated strobe, there is no guarantee that the data read in by the destination device is valid. For instance, if the source device was turned off, the strobe would still be initiated, all zeroes would be read in and the strobe would be de-asserted. The destination device cannot tell if the all-zero data was read in from an active device or a powered-down device.

9 Source-initiated transfer using handshaking Data bus SOURCE UNIT Data valid Data accepted DESTINATION UNIT Data bus Data valid Data accepted Valid data 1997 John D. Carpinelli, All Rights Reserved 9 Handshaking removes the uncertainty in asynchronous data transfers by providing confirmation that data was read in successfully. The tradeoff is the increased hardware requirements. In source-initiated data transfer using handshaking, the source unit places valid data onto the data bus and then asserts a data valid signal. So far this is the same as before, with the data valid signal replacing the strobe. But now something different happens. The data valid signal does not stay high for some predetermined amount of time. Instead it stays high until the destination unit tells it to stop. The destination unit reads in the data and then asserts a data accepted signal. This tells the source that the data has been accepted and to remove it from the bus. It de-asserts the data valid signal and removes data from the bus. The destination unit acknowledges this by deasserting its data accepted signal, which in turn tells the source device that it may now initiate another data transfer. One thing not noted here is what to do if the destination device never accepts the data (for example, if it is turned off). The source unit might include a timer that will check for this condition and report an error when it occurs.

10 Destination-initiated transfer using handshaking Data bus SOURCE UNIT Data valid Ready for data DESTINATION UNIT Data bus Data valid Ready for data Valid data 1997 John D. Carpinelli, All Rights Reserved 10 Destination-initiated transfer using handshaking is also similar to its nonhandshaking counterpart. The ready for data signal replaces the strobe and is asserted by the destination device to request data. The source device responds by placing data onto the bus and then, after some predetermined amount of time to allow for settling, it asserts the data valid signal. This tells the destination device that it can now read in the data. It does so and signals the source device by de-asserting the ready for data signal. This is followed by the source unit removing the data from the data bus and resetting the data valid signal. This notifies the destination unit that it can now request another data transfer. Both source- and destination-initiated transfer using handshaking are similar to the process used by the Basic Computer.

11 Synchronous serial transmission Share a common clock (short distance) Separate clocks with synchronization signals (long distance) Bits are transmitted continuously 1997 John D. Carpinelli, All Rights Reserved 11 Serial data transmission may be synchronous or asynchronous. In synchronous transmission, the source and destination units share a common clock. This is useful when data must be transmitted within a computer or over very short distances for which both devices may access a single clock. Data can also be transmitted over longer distances synchronously. To do this, both the source and destination units must also send synchronization signals periodically to maintain calibration between the two clocks. Unlike asynchronous data transmission, in which the transmission line is used only when sending data, synchronous data transmission requires that transmission occurs continuously. When no data is to be sent, bits must still be transmitted to maintain synchronization.

12 Asynchronous serial transmission Bits are transmitted as data is available Data is sent in the following format: Start bit (0) Character bits Stop bit(s) (1) Line is set to 1 when idle 1997 John D. Carpinelli, All Rights Reserved 12 In asynchronous serial data transmission, the transmission line is only used when information is transferred. When not in use, the line is set to 1. To send a single character, the source sends a start bit, which is 0, for one clock cycle. This signals the destination unit to receive data. Following this, the source unit places the character data onto the transmission line, one bit per clock cycle. Finally, it sends one or more stop bits, which is 1. The two units must agree on a few things beforehand. First of all, they must both expect the character to contain the same number of bits. They must also agree on whether or not there will be a parity bit transmitted and, if so, whether it will be odd or even parity. Finally, they must agree on the number of stop bits, usually 1, 1 1/2 or 2. (These numbers refer to the number of clock periods. For example, for bits per second, these correspond to us, us and us, respectively.)

13 UARTs Universal Asynchronous Receiver/ Transmitter (also called Asynchronous Communication Interface) Performs serial/parallel conversion Bidirectional (input and output) 1997 John D. Carpinelli, All Rights Reserved 13 A Universal Asynchronous Receiver/Transmitter, or UART, is a specialized circuit or chip used to transmit and receive serial data. The serial ports of most computers are designed to use UART chips. On the transmitting side, it receives data from the computer in parallel form. It converts the data to serial form and transmits it, along with the requisite start, parity and stop bits. The receiving UART performs exactly the opposite functions. It receives the data, stripping out the start, parity and stop bits, and converts it to parallel form. The parallel data is then made available to the computer. As noted previously, both the sender and the receiver must agree on the parity, the number of character bits and the number of stop bits.

14 UARTs See figure 11.8, p. 399 of the textbook John D. Carpinelli, All Rights Reserved 14 Here is a block diagram of a generic UART. First we ll review the components and then we ll go through the functions of the UART. The transmitter register is used to hold a character to be transmitted. It is loaded in parallel. It makes its data available to a shift register which loads the data in parallel and outputs it serially. The receiver register works exactly the opposite way. Serial data is received by another shift register which converts it to parallel form. The receiver register reads it in parallel. The register selects (RS), read (RD) and write (WR) signals, along with the chip select (CS), are combined to write data to and read data from the registers. The computer configures the UART by sending commands to the control register. These commands include such operations as setting the baud rate (number of bits per second), the parity and the number of stop bits. The status register is used to store information the computer will need. Two status bits in all UARTs tell whether the transmitter and receiver registers are full or empty.

15 UARTs See figure 11.8, p. 399 of the textbook John D. Carpinelli, All Rights Reserved 15 To transmit data, this process is followed. If not already done, the CPU initializes the UART, setting the speed and numbers of character and stop bits. This is done only once regardless of the number of characters to be transmitted. To transmit a character, the CPU reads the status register to see if the transmitter register is empty. If not, it may continue to read the status register periodically until it is ready. This is done to avoid overwriting the previous data. Once it is empty the CPU writes data to the transmitter register. The UART modifies its flag to indicate that the transmitter register is not empty. Next, the UART moves this data, along with the start and stop bit(s), in parallel to the shift register and resets its flag to empty. (This assumes that the shift register is empty. Internal circuitry assures that data in the shift register is not overwritten.) The UART transmits data serially by shifting it out of the shift register. The process of receiving data is similar. The receiver shift register accepts serial data, strips off the start and stop bit(s), and moves it to the receiver register in parallel, setting its flag. The CPU reads the flag and, when indicating that the receiver register contains data, reads in the data; this causes the UART to reset its flag. Notice that while one piece of data is being transmitted or received serially, another may be input to or output from the CPU. This set up is called double buffering; it improves performance by avoiding delays between characters.

16 UART errors Parity error Framing error Overrun error 1997 John D. Carpinelli, All Rights Reserved 16 As with most things in life, errors can and do occur. The UART interface checks for three types of transmission errors. Parity errors occur when the parity, or number of 1 s, is incorrect. Framing errors occur when the number of stop bits is incorrect. Overrun errors occur when incoming data overwrites data in the receiver register which has not yet been read in by the CPU, resulting in lost data. The status register contains a bit for each of these conditions.

17 FIFOs First In First Out Used to buffer data during transmission Can be serial or parallel 1997 John D. Carpinelli, All Rights Reserved 17 A FIFO is a buffer which stores data in a first-in first-out manner. It is essentially a hardware queue. Data is input to the back end of the FIFO and is propagated forward. The first piece of data in the queue is the only one that can be output. FIFOs are used as data buffers; they can process data either serially or in parallel.

18 FIFOs See figure 11.9, p. 401 of the textbook John D. Carpinelli, All Rights Reserved 18 This figure shows a circuit diagram for a 4x4 parallel FIFO. The registers at the top of the diagram, R1, R2, R3 and R4, hold the actual data. The rest of the circuit keeps track of which registers contain valid data and handle I/O operations. Each register has a corresponding SR flip-flop, Fi, which indicates the status of register Ri. If Fi=0, Ri does not contain valid data; otherwise it does. The inverted output of the leftmost flip-flop, F1, drives the output signal called input ready. If R1 contains valid data, F1=1 and input ready=0. This signals the outside world not to write data to the FIFO. If R1 does not contain valid data, then input ready=1 and the FIFO may receive valid data. The output ready signal is 1 whenver F4=1, which occurs whenever R4 contains valid data. Thus it is only set when the FIFO contains data ready to be output. There is also an input called master clear. By resetting each SR flip-flop to zero, it marks all registers Ri as not having valid data. Now let s look at what happens when data is input to the FIFO. Assume that initially it has one valid piece of data. To input the data, an external device checks the status of input ready. If it is 1, then the FIFO can accept at least one more data input, so the external device places its data on the data input lines and asserts the insert signal. This loads the data into R1. It also sets F1 to 1, which in turn sets F 1 to zero, disabling the clock. Since the FIFO initially had more than one location available, F2=0 and F 2=1, so the clock for R2 is activated, propagating the data from R1 to R2. The R2 clock signal is also fed back, both setting F2=1 and F1=0. This same process is followed as the data propagates to R3. Once the data reaches R3, it stops because R4 already has data; F4=1, so F 4=0 and the clock of R4 is not activated. To read data from the FIFO, the external device simply reads the data from the data output pins and asserts the delete signal. This resets F4 to zero, marking the contents of R4 as invalid data. Other data in the FIFO will now propagate forward as in the case of inserting data.

19 Data transfer modes Programmed I/O Interrupt-initiated I/O Direct memory access 1997 John D. Carpinelli, All Rights Reserved 19 I/O transfers are handled in one of three ways. In programmed I/O the computer program under execution has specific instructions which access the I/O device. Interrupt-initiated I/O occurs when the I/O device issues an interrupt signal to the CPU which causes it to suspend the program currently under execution and to service the I/O device. It is possible to perform I/O operations without involving the CPU at all. This is referred to as direct memory access, or DMA. We will discuss each of these in more detail shortly.

20 Programmed I/O Data is transferred between an I/O device and the CPU, and between the CPU and memory, but not directly between the I/O device and memory CPU may poll I/O device to determine data request or availability 1997 John D. Carpinelli, All Rights Reserved 20 Programmed I/O transfers data between the CPU and an I/O device. The data may, in turn, be transferred between the CPU and memory. However, programmed I/O does not allow data to be transferred directly between an I/O device and memory. In programmed I/O the program must not only transfer the data, but it must also make sure the data is ready. This is often accomplished via a status bit which is set when the I/O device is ready to transfer data. This could be used with the UART described earlier, which has a bit in its status register to indicate whether or not input data is ready.

21 Interrupt-driven I/O I/O device sends interrupt request to the CPU CPU calls a subroutine which processes the interrupt Vectored or non-vectored interrupt Example: Basic Computer I/O (nonvectored interrupt) 1997 John D. Carpinelli, All Rights Reserved 21 Constantly polling an I/O device until it is ready to transfer data is an inefficient use of CPU power. Interrupt-driven I/O is one way to relieve the CPU of this task. In this I/O methodology, the I/O device sends an interrupt signal to the CPU when it is ready to transfer data. The CPU finishes its current instruction and then, if interrupts are enabled, calls an interrupt service routine to process the interrupt. If the CPU has more than one I/O device which sources interrupts, it must differentiate them. Vectored interrupts supply information to the CPU, the interrupt vector, which determines the location in memory of the interrupt service routine. Each I/O device would have its own routine. Non-vectored interrupts, often assigned unique input pins on a CPU, call routines at fixed locations. The Basic Computer uses non-vectored interrupt-driven I/O.

22 Priority interrupts Some interrupts are more important or time-critical than others Daisy-chaining priority Parallel priority interrupt 1997 John D. Carpinelli, All Rights Reserved 22 Some interrupts are more important or time-critical than others. For example, a computer screen must be updated every 33 ms or so, and it must be updated very nearly at those times in order to avoid screen flicker. If the computer is reading data from a disk when the screen needs to be updated, the disk transfer can wait. There are two primary methods of implementing priority interrupts in hardware: daisy-chaining and parallel priority interrupts. Explanations of both follow.

23 Daisy-chaining See figure 11.12, p. 409 of the textbook John D. Carpinelli, All Rights Reserved 23 This figure shows how to implement priority interrupts via daisy chaining. Each device supplies an interrupt request input to the CPU; all the interrupt requests are wire-ored together to generate a single interrupt signal. When the CPU receives an interrupt, it doesn t know which device generated the interrupt request. When ready, the CPU sets INTACK to 1, thus initiating the interrupt acknowledge. Device 1 receives this signal at its PI input. If it requested the interrupt, it sets its PO to zero and outputs its interrupt vector at VAD1. If it did not request an interrupt, it sets PO to 1, thus passing the interrupt acknowledge to the next device. A device can be in one of three states. If PI=1 and PO=1, it could control the interrupt but does not want to do so. If PI=1 and PO=0 it is controlling the interrupt. Finally, if PI=0 and PO=0 it is pre-empted by an interrupt of higher priority, whether or not it requested an interrupt. It is never possible to be in a state where PI=0 and PO=1. Note that interrupts can themselves be interrupted by an interrupt of higher priority.

24 Daisy-chaining: stage design See figure 11.13, p. 410 of the textbook John D. Carpinelli, All Rights Reserved 24 This figure shows the internal organization of a stage of the daisy-chained priority hardware. If an interrupt is requested, the output of the interrupt request flip-flop, RF, is set to 1. If PI=1, the VAD lines are enabled and the vector address is made available to the bus. Also, PO is set to zero. After some sufficient predeterined delay, the flip-flop is reset to zero. By this time the CPU already will have begun servicing the interrupt. If PI=0, VAD is not enabled, PO=0 and RF is never reset. This allows preempted interrupts to remain pending and not become lost.

25 Parallel priority interrupts See figure 11.14, p. 411 of the textbook John D. Carpinelli, All Rights Reserved 25 It is also possible to arbitrate interrupt requests in parallel by using a priority encoder. As shown in this figure, each device has its own interrupt bit as well as its own interrupt mask, which enables or disables the interrupt. The enabled bits are input to a priority encoder which encodes the active interrupt request. If more than one interrupt request is active, it encodes the request of highest priority. If the interrupts overall are enabled, i.e. IEN=1, and any interrupt is activated, i.e. IST=1, an interrupt request is issued to the CPU. Once it is acknowledged, the vectored address, which contains the encoded priority interrupt, is forwarded to the CPU, which then invokes the proper interrupt service routine.

26 Interrupt process The process used by the Basic Computer 1. Finish the current instruction! 2. Push return address onto the stack 3. Acknowledge interrupt; disable further interrupts 4. Go to interrupt service routine 1997 John D. Carpinelli, All Rights Reserved 26 The interrupt process, regardless of how the interrupt is signaled, is very similar to the process used in the Basic Computer. First and foremost, the CPU finishes executing the current instruction. Then it pushes the return address onto the stack and acknowledges the interrupt. Also, it disable further interrupts, at least until the interrupt service routine is initiated. If the interrupt is vectored, the CPU reads in the vectored address and goes to the routine at that address; otherwise it goes to the routine at the predetermined address associated with the interrupt.

27 Direct Memory Access (DMA) Useful for transfers of blocks of data between I/O and memory (e.g. loading programs from disk, screen refresh) DMA controller issues control signals, address Coordinates control with CPU 1997 John D. Carpinelli, All Rights Reserved 27 Direct Memory Access, or DMA, is an efficient method for transferring data between memory and an I/O device directly, without involving the CPU. Such transfers are much faster than moving data between memory and the CPU and between the CPU and an I/O device. Loading programs from disk into memory is a function well served by DMA. Under DMA transfer, a DMA controller issues the necessary signals to the computer system, including address and control information. It coordinates with the CPU to make sure the CPU tri-states its equivalent pins to avoid conflicts.

28 DMA controller - interface See figure 11.16, p. 416 of the textbook John D. Carpinelli, All Rights Reserved 28 The DMA controller gains control of the system buses only after obtaining permission from the CPU. The DMA controller issues a Bus Request to the CPU, thus asking for permission to perform a DMA transfer. When it is ready to allow this, the CPU issues a Bus Grant and tri-states its address, data and control pins. The DMA controller then performs the data transfer. When finished, the DMA controller de-asserts the Bus Request. The CPU then deasserts the Bus Grant and reactivates its other pins, continuing with its previous tasks.

29 DMA controller - block diagram See figure 11.17, p. 417 of the textbook John D. Carpinelli, All Rights Reserved 29 Internally, the DMA controller has several components it needs in order to perform its functions. It has three registers. The address register is used to specify the address of the memory location to be accessed. After each word is transferred, this register is incremented to point to the next location. The word count register, as its name implies, contains the number of words to be transferred. After every word transfer, this register is decremented. The control register contains information regarding the mode of transfer. In burst transfer mode, the DMA controller retains control of the system buses as it transfers the entire block of data. In cycle stealing mode, the DMA controller transfers one word at a time, interleaving its operations with those of the CPU. The DMA controller also has a logic section which handles interaction with the CPU and with the I/O device. The DMA select is an enable signal; systems may have more than one DMA controller. The register select is used by the CPU when accessing the registers within a DMA controller; each register is treated as a separate I/O port by the CPU. The read and write signals are used both when communicating with the CPU and when performing the DMA transfer. The Bus Request and Bus Grant signals operate as described previously. The DMA Request and DMA Acknowledge signals interface directly with the I/O device. They implement a handshaking between the two.

30 DMA initialization Set starting address of memory block Set word count (i.e. block size) Set transfer direction control (read/write) Initiate DMA transfer signal 1997 John D. Carpinelli, All Rights Reserved 30 Before performing a DMA transfer, the DMA controller must be initialized by the CPU. To do this the CPU sends the following information to the DMA controller: the starting address in memory; the word count, i.e. the number of words to be transferred; and the control word, which specifies the transfer mode and direction. The CPU then sends a control word to the DMA controller instructing it to initiate a Bus Request.

31 DMA configuration See figure 11.18, p. 419 of the textbook John D. Carpinelli, All Rights Reserved 31 This figure shows how a DMA controller is configured in a computer system. Note that the Bus Grant signal is not bidirectional, although it is drawn that way here. That signal is sent from the CPU to the DMA controller; it cannot travel in the opposite direction. Also note that the data bus connects to both the DMA controller and the I/O device. The connection to the DMA controller is used solely to load the registers and issue commands. The actual data to be transferred passes between memory and the I/O device and does not pass through the DMA controller.

32 Input-Output Processor (IOP) Used to relieve CPU of I/O tasks Useful for batch processing IOP can handle data files as well as program files Transfer is similar to DMA transfer 1997 John D. Carpinelli, All Rights Reserved 32 I/O processors are used to relieve the CPU of I/O tasks by interfacing directly with the I/O devices. This is similar to DMA controllers, except each I/O processor (IOP) can handle several I/O devices. Systems which perform batch processing or time-sharing may benefit from I/O processors which can move both programs and data files in and out of memory, thus freeing up the CPU to execute programs.

33 IOP/CPU configuration See figure 11.19, p. 421 of the textbook John D. Carpinelli, All Rights Reserved 33 The IOP interfaces to the computer system in a manner similar to that of a DMA controller. The CPU issues commands to the IOP, which acts on those commands to perform the requisite I/O operation. The IOP performs the task and writes a status word into a predetermined memory location which the CPU will examine at its leisure.

34 IOP/CPU communication See figure 11.20, p. 422 of the textbook John D. Carpinelli, All Rights Reserved 34 A more complete description of how this works is given in this diagram. First the CPU sends a status request to the I/O processor, which returns its status to a predetermined memory location. The CPU reads this result and, if OK, sends a command to the IOP to start an I/O operation. The CPU then continues with another program while the IOP conducts the data transfer, via DMA, and prepares a status report. When finished, it interrupts the CPU, which in turn requests the status of the transfer. The IOP moves the status word to a predetermined memory location from which the CPU reads it in. At this point, the CPU can perform whatever operations it needs to on the data.

35 Serial communication Data communication processor: distributes and collects data from many remote terminals Communicates via individual connections, as opposed to the bus used by IOPs Data and control are transferred serially Communicates with the CPU in the same way as an IOP 1997 John D. Carpinelli, All Rights Reserved 35 Unlike an IOP, a data communication processor interfaces to each I/O device through a dedicated serial connection. Both data and control information are sent via this connection. It communicates with the CPU just as an IOP does.

36 Serial communication - MODEM MODEM: modulator-demodulator Converts data to an audio signal Can be synchronous or asynchronous Half-duplex or full-duplex 1997 John D. Carpinelli, All Rights Reserved 36 A modem (modulator-demodulator) is used to establish serial communications, most commonly over standard telephone lines. The sender converts the data to be sent to an audio signal and then transmits that signal. The destination unit converts this signal back to the original data. Depending on the units connected, this may be synchronous or asynchronous. The communication may be half duplex, i.e. only one of the two units can send data at a given time, or full duplex. In full duplex mode, each unit can transmit data to the other unit simultaneously. This is accomplished by using different carrier frequencies.

37 Serial communication - modes Block transfer Longitudinal Redundancy Check (LRC) Cyclic Redundancy Check (CRC) Protocols 1997 John D. Carpinelli, All Rights Reserved 37 Asynchronous communications require start and stop bits for each character transmitted; for large blocks of data this presents significant overhead. In synchronous transmission, these bits are not used. The two units have internal clocks with the same frequency; the frequency of the incoming bit stream is used to adjust the receiver clock to maintain synchronization. In synchronous transmission, data is sent in blocks. Special characters at the beginning and end of the block supply information needed to complete successful data transmission. Another thing needed to check on the successful transmission is error checking. First, each character includes a parity bit which determines if there is a single bit error within the character. There are also two other checks which can be performed. Longitudinal Redundancy Check (LRC) is basically a parity check for the entire block. It is the exclusive-or of all characters in the block; it is transmitted along with the characters. The destination unit reads the incoming characters, calculates the LRC and compares it to the value transmitted. If they do not match, it discards the block and sends a request for retransmission. A third method of checking data validity is the Cyclic Redundancy Check (CRC). This involves passing the characters received through a feedback shift register which includes some exclusive-or gates to generate a value. This CRC value is used to detect burst errors. A critical component in successful transmission is that both the source and destination units expect data to be transmitted using the same rules. These rules are called a protocol. They establish and terminate transfers, identify sender and receiver and perform error checking.

38 Special characters Character Function SYN SOH STX/ETX EOT ACK/NAK Establish synchronization Start of header Start/end of text End of transmission Acknowledge/Negative ack John D. Carpinelli, All Rights Reserved 38 When transmitting data using a character-oriented protocol, several special characters are needed. SYN is used to establish synchronization between the two units. SOH denotes the start of the block header. STX and ETX show the start and end of the block of text being sent. BCC is a checking value, either the LRC or CRC of the data. The receiver processes incoming data and sends one of two characters back to the sender. If the data was received properly, it sends an acknowledge, ACK; if not, it returns a negative acknowledge, NAK.

39 Transmission example SYN SYN SOH Header STX Text ETX BCC 1997 John D. Carpinelli, All Rights Reserved 39 Here is a simple example of data transmission using a character-oriented protocol. First, two SYN characters are sent to establish synchronization. Then a SOH character is sent, followed by the header information. The header may include address and control information. Then the text of the block is sent, surrounded by an STX and an ETX character. Finally the BCC character and the value of either the LRC or CRC are sent.

40 Transmission example See table 11.5, p. 434 of the textbook John D. Carpinelli, All Rights Reserved 40 This figure shows a typical transmission from a terminal to the processor. Notice that the header is fairly simple; it contains the address of the source terminal. The text may be of any length up to a maximum specified by the protocol. Transmission is ended by sending the value of LRC.

41 Transmission example See table 11.6, p. 435 of the textbook John D. Carpinelli, All Rights Reserved 41 The processor would receive this request and, if there were no transmission errors, send two SYN characters and an ACK. It would process the request, issuing SYN characters while the line is idle in order to maintain synchronization. It would then send the result to the terminal using exactly the same procedure. It would also finish with the value of its LRC. There is one problem not yet discussed: what if one of the characters of data has the same ASCII value as a control character, such as SOH or ETX? One method to resolve this is the Data Link Escape (DLE) character. It is inserted in front of each control character. For example, the leading SOH character is actually transmitted as DLE SOH. If the text portion contains data with the DLE bit pattern, it is transmitted with an additional DLE character following it. The destination unit performs the inverse operation and restores the data.

42 Bit-oriented protocol Flag Address Control Info Frame check Flag bits 8 bits 16 bits John D. Carpinelli, All Rights Reserved 42 Bit oriented protocols are used to transmit data that may not be characteroriented. As shown in this figure, the frame used to transmit the data begins with an 8-bit flag This is followed by the address field which, as its name implies, contains the address of the device. The control field specifies information about the transfer associated with this frame. We will look at this field in more detail next. The information field is the binary data to be transmitted; it may be of any length. After the data comes the frame check, which is a CRC value used to detect transmission errors. Finally, a flag terminates the frame. Just as in the character-oriented protocol, it is possible to have a problem in transmission due to a valid data value. In this case it occurs if the bit pattern , the same value as the flag, occurs in the data. The bit oriented protocol uses zero insertion to avoid this problem. After any five consecutive ones, a zero is inserted into the data stream; the destination unit removes this bit to restore the original bit pattern. Since the flag has six consecutive ones, this assures that an erroneous flag will not occur.

43 Control fields See figure 11.27, p. 438 of the textbook John D. Carpinelli, All Rights Reserved 43 Here are the three control field formats in the bit oriented protocol. The information transfer format is used when the frame contains data to be transmitted. The Ns and Nr fields indicate the number of sent and successfully received frames. The P/F bit is used to request a transfer and to denote that the final packet has been sent. The supervisory format is used to acknowledge receipt of a previous frame and to convey status and error information. Frames with this control field format do not have an information field. The unnumbered format is used to initialize and to terminate links and to report errors.

44 Summary I/O interfacing Asynchronous data transfer Interrupt driven I/O DMA transfers I/O processors Serial communications Next module: memory systems 1997 John D. Carpinelli, All Rights Reserved 44 This module has examined various modes of I/O interfacing. We have examined asynchronous data transfers and the hardware required to implement them. We also reviewed I/O interrupts and their implementation. We also looked at DMA transfers and I/O processors, two methods used to alleviate the CPU of I/O tasks. We also discussed serial communications. In the next module we will examine memory systems. We will discuss various system design methodologies and their effects on system performance.

INPUT-OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION INPUT-OUTPUT ORGANIZATION Peripheral Devices: The Input / output organization of computer depends upon the size of computer and the peripherals connected to it. The I/O Subsystem of the computer, provides

More information

INPUT-OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION 1 INPUT-OUTPUT ORGANIZATION Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes of Transfer Priority Interrupt Direct Memory Access Input-Output Processor Serial Communication 2

More information

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals. 1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals. A typical communication link between the processor and

More information

Input-Output Organization

Input-Output Organization Ted Borys - CSI 404 5/1/2004 Page 11-1 Section 11 Input-Output Organization ASCII Character Set 94 printable characters Upper & lowercase letters 10 numerals Special characters such as $, @, #, % 34 control

More information

Blog - https://anilkumarprathipati.wordpress.com/

Blog - https://anilkumarprathipati.wordpress.com/ Input-Output organization 1. Peripheral Devices The input-output subsystem of a computer, referred to as I/O, provides an efficient mode of communication between the central system and the outside environment.

More information

Chapter 7 : Input-Output Organization

Chapter 7 : Input-Output Organization Chapter 7 Input-Output organization 7.1 Peripheral devices In addition to the processor and a set of memory modules, the third key element of a computer system is a set of input-output subsystem referred

More information

Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA) I/O Processors. 10/12/2017 Input/Output Systems and Peripheral Devices (02-2)

Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA) I/O Processors. 10/12/2017 Input/Output Systems and Peripheral Devices (02-2) Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA) I/O Processors 1 Principle of Interrupt-Driven I/O Multiple-Interrupt Systems Priority Interrupt Systems Parallel Priority Interrupts Daisy-Chain

More information

4 Multiplexer. Y Fig Keyboard Scan Matrix

4 Multiplexer. Y Fig Keyboard Scan Matrix - 4 Multiplexer Microcontroller 3 Decoder X Y Fig. - Keyboard Scan Matrix 2 Prentice Hall, Inc. -2 Track Sector Head positioning Fig. -2 Hard Disk Format 2 Prentice Hall, Inc. -3 RGB electron guns R G

More information

INPUT-OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION INPUT-OUTPUT ORGANIZATION Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes of Transfer Priority Interrupt Direct Memory Access Input-Output Processor Serial Communication PERIPHERAL

More information

Modes of Transfer. Interface. Data Register. Status Register. F= Flag Bit. Fig. (1) Data transfer from I/O to CPU

Modes of Transfer. Interface. Data Register. Status Register. F= Flag Bit. Fig. (1) Data transfer from I/O to CPU Modes of Transfer Data transfer to and from peripherals may be handled in one of three possible modes: A. Programmed I/O B. Interrupt-initiated I/O C. Direct memory access (DMA) A) Programmed I/O Programmed

More information

INPUT/OUTPUT ORGANIZATION

INPUT/OUTPUT ORGANIZATION INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and

More information

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION Introduction A general purpose computer should have the ability to exchange information with a wide range of devices in varying environments. Computers

More information

Architecture of 8085 microprocessor

Architecture of 8085 microprocessor Architecture of 8085 microprocessor 8085 consists of various units and each unit performs its own functions. The various units of a microprocessor are listed below Accumulator Arithmetic and logic Unit

More information

INPUT/OUTPUT ORGANIZATION

INPUT/OUTPUT ORGANIZATION INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and

More information

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1 Module 3 Embedded Systems I/O Version 2 EE IIT, Kharagpur 1 Lesson 15 Interrupts Version 2 EE IIT, Kharagpur 2 Instructional Objectives After going through this lesson the student would learn Interrupts

More information

CHAPTER 5 REGISTER DESCRIPTIONS

CHAPTER 5 REGISTER DESCRIPTIONS USER S MANUAL 5 CHAPTER 5 REGISTER DESCRIPTIONS 5. INTRODUCTION This section describes the functions of the various bits in the registers of the SCC (Tables 5- and 5-2). Reserved bits are not used in this

More information

INTERFACING THE ISCC TO THE AND 8086

INTERFACING THE ISCC TO THE AND 8086 APPLICATION NOTE INTERFACING THE ISCC TO THE 68 AND 886 INTRODUCTION The ISCC uses its flexible bus to interface with a variety of microprocessors and microcontrollers; included are the 68 and 886. The

More information

Chapter 3. The Data Link Layer. Wesam A. Hatamleh

Chapter 3. The Data Link Layer. Wesam A. Hatamleh Chapter 3 The Data Link Layer The Data Link Layer Data Link Layer Design Issues Error Detection and Correction Elementary Data Link Protocols Sliding Window Protocols Example Data Link Protocols The Data

More information

Summer 2003 Lecture 21 07/15/03

Summer 2003 Lecture 21 07/15/03 Summer 2003 Lecture 21 07/15/03 Simple I/O Devices Simple i/o hardware generally refers to simple input or output ports. These devices generally accept external logic signals as input and allow the CPU

More information

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1 EEL 4744C: Microprocessor Applications Lecture 7 Part 1 Interrupt Dr. Tao Li 1 M&M: Chapter 8 Or Reading Assignment Software and Hardware Engineering (new version): Chapter 12 Dr. Tao Li 2 Interrupt An

More information

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1 Reading Assignment EEL 4744C: Microprocessor Applications Lecture 7 M&M: Chapter 8 Or Software and Hardware Engineering (new version): Chapter 12 Part 1 Interrupt Dr. Tao Li 1 Dr. Tao Li 2 Interrupt An

More information

CS 4453 Computer Networks Winter

CS 4453 Computer Networks Winter CS 4453 Computer Networks Chapter 2 OSI Network Model 2015 Winter OSI model defines 7 layers Figure 1: OSI model Computer Networks R. Wei 2 The seven layers are as follows: Application Presentation Session

More information

6 Direct Memory Access (DMA)

6 Direct Memory Access (DMA) 1 License: http://creativecommons.org/licenses/by-nc-nd/3.0/ 6 Direct Access (DMA) DMA technique is used to transfer large volumes of data between I/O interfaces and the memory. Example: Disk drive controllers,

More information

COMP asynchronous buses April 5, 2016

COMP asynchronous buses April 5, 2016 All the I/O examples we have discussed use the system bus to send data between the CPU, main memory, and I/O controllers. The system bus runs at a slower clock speed than the CPU because of greater distances

More information

COMP 273 Winter asynchronous I/O April 5, 2012

COMP 273 Winter asynchronous I/O April 5, 2012 All the I/O examples we have discussed use the system bus to send data between the CPU, main memory, and I/O controllers. The system bus runs at a slower clock speed than the CPU because of greater distances

More information

Chapter 8. Input Output Organization

Chapter 8. Input Output Organization Chapter 8 Input Output Organization 8.1 Introduction: In the design of a simple computer, we assumed one input device and one output device transferring data in and out of the accumulator using a programmed

More information

CHAPTER 4 DATA COMMUNICATION MODES

CHAPTER 4 DATA COMMUNICATION MODES USER S MANUAL CHAPTER DATA COMMUNICATION MODES. INTRODUCTION The SCC provides two independent, full-duplex channels programmable for use in any common asynchronous or synchronous data communication protocol.

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

a16450 Features General Description Universal Asynchronous Receiver/Transmitter

a16450 Features General Description Universal Asynchronous Receiver/Transmitter a16450 Universal Asynchronous Receiver/Transmitter September 1996, ver. 1 Data Sheet Features a16450 MegaCore function implementing a universal asynchronous receiver/transmitter (UART) Optimized for FLEX

More information

Introduction to Embedded System I/O Architectures

Introduction to Embedded System I/O Architectures Introduction to Embedded System I/O Architectures 1 I/O terminology Synchronous / Iso-synchronous / Asynchronous Serial vs. Parallel Input/Output/Input-Output devices Full-duplex/ Half-duplex 2 Synchronous

More information

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

More information

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester Operating System: Chap13 I/O Systems National Tsing-Hua University 2016, Fall Semester Outline Overview I/O Hardware I/O Methods Kernel I/O Subsystem Performance Application Interface Operating System

More information

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection

Data link layer functions. 2 Computer Networks Data Communications. Framing (1) Framing (2) Parity Checking (1) Error Detection 2 Computer Networks Data Communications Part 6 Data Link Control Data link layer functions Framing Needed to synchronise TX and RX Account for all bits sent Error control Detect and correct errors Flow

More information

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013 TOPICS TODAY I/O Architectures Interrupts Exceptions FETCH EXECUTE CYCLE 1.7 The von Neumann Model This is a general

More information

DATA LINK LAYER UNIT 7.

DATA LINK LAYER UNIT 7. DATA LINK LAYER UNIT 7 1 Data Link Layer Design Issues: 1. Service provided to network layer. 2. Determining how the bits of the physical layer are grouped into frames (FRAMING). 3. Dealing with transmission

More information

Transmission SIGNALs

Transmission SIGNALs Chapter 6 Digital Communications Basics 6.1 Introduction 6.2 Transmission media 6.3 Source of signal impairment 6.4 Asynchronous Transmission 6.5 Synchronous Transmission 6.6 Error Detection Methods 6.7

More information

Computer Architecture CS 355 Busses & I/O System

Computer Architecture CS 355 Busses & I/O System Computer Architecture CS 355 Busses & I/O System Text: Computer Organization & Design, Patterson & Hennessy Chapter 6.5-6.6 Objectives: During this class the student shall learn to: Describe the two basic

More information

Accessing I/O Devices Interface to CPU and Memory Interface to one or more peripherals Generic Model of IO Module Interface for an IO Device: CPU checks I/O module device status I/O module returns status

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

More information

or between microcontrollers)

or between microcontrollers) : Communication Interfaces in Embedded Systems (e.g., to interface with sensors and actuators or between microcontrollers) Spring 2016 : Communication Interfaces in Embedded Systems Spring (e.g., 2016

More information

Chapter Operation Pinout Operation 35

Chapter Operation Pinout Operation 35 68000 Operation 35 Chapter 6 68000 Operation 6-1. 68000 Pinout We will do no construction in this chapter; instead, we will take a detailed look at the individual pins of the 68000 and what they do. Fig.

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Input and Output Input/Output Devices The OS is responsible for managing I/O devices Issue requests Manage

More information

Unit 5. Memory and I/O System

Unit 5. Memory and I/O System Unit 5 Memory and I/O System 1 Input/Output Organization 2 Overview Computer has ability to exchange data with other devices. Human-computer communication Computer-computer communication Computer-device

More information

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1 Data Link Networks Hardware Building Blocks Nodes & Links CS565 Data Link Networks 1 PROBLEM: Physically connecting Hosts 5 Issues 4 Technologies Encoding - encoding for physical medium Framing - delineation

More information

ECE 4450:427/527 - Computer Networks Spring 2017

ECE 4450:427/527 - Computer Networks Spring 2017 ECE 4450:427/527 - Computer Networks Spring 2017 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 5.1: Link Layer Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer

More information

Digital Design Laboratory Lecture 6 I/O

Digital Design Laboratory Lecture 6 I/O ECE 280 / CSE 280 Digital Design Laboratory Lecture 6 I/O Input/Output Module Interface to CPU and Memory Interface to one or more peripherals Generic Model of I/O Module External Devices Human readable

More information

Dr e v prasad Dt

Dr e v prasad Dt Dr e v prasad Dt. 12.10.17 Contents Characteristics of Multiprocessors Interconnection Structures Inter Processor Arbitration Inter Processor communication and synchronization Cache Coherence Introduction

More information

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel Chapter-6 SUBJECT:- Operating System TOPICS:- I/O Management Created by : - Sanjay Patel Disk Scheduling Algorithm 1) First-In-First-Out (FIFO) 2) Shortest Service Time First (SSTF) 3) SCAN 4) Circular-SCAN

More information

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING UNIT-2 2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS 2.2.1 Pure ALOHA 2.2.2 Slotted ALOHA 2.2.3 Carrier Sense Multiple Access 2.2.4 CSMA with Collision Detection 2.2.5 Collision Free Protocols 2.2.5.1

More information

3. Controtlto specify the mode of transfer such as read or write 4. A control to start the DMA transfer

3. Controtlto specify the mode of transfer such as read or write 4. A control to start the DMA transfer DMA Controller The DMA controller needs the usual circuits of an interface to communicate the CPU and 10 device. In addition, it needs an address register, a word count register, and a set of address lines.

More information

Digital Input and Output

Digital Input and Output Digital Input and Output Topics: Parallel Digital I/O Simple Input (example) Parallel I/O I/O Scheduling Techniques Programmed Interrupt Driven Direct Memory Access Serial I/O Asynchronous Synchronous

More information

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

More information

操作系统概念 13. I/O Systems

操作系统概念 13. I/O Systems OPERATING SYSTEM CONCEPTS 操作系统概念 13. I/O Systems 东南大学计算机学院 Baili Zhang/ Southeast 1 Objectives 13. I/O Systems Explore the structure of an operating system s I/O subsystem Discuss the principles of I/O

More information

Topics. Interfacing chips

Topics. Interfacing chips 8086 Interfacing ICs 2 Topics Interfacing chips Programmable Communication Interface PCI (8251) Programmable Interval Timer (8253) Programmable Peripheral Interfacing - PPI (8255) Programmable DMA controller

More information

SRI VIDYA COLLEGE OF ENGINEERING AND TECHNOLOGY,VIRUDHUNAGAR

SRI VIDYA COLLEGE OF ENGINEERING AND TECHNOLOGY,VIRUDHUNAGAR Year/sem: 02/04 Academic Year: 2014-2015 (even) UNIT II THE 8086 SYSTEM BUS STRUCTURE PART A 1. What are the three groups of signals in 8086? The 8086 signals are categorized in three groups. They are:

More information

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital hardware modules that accomplish a specific information-processing task. Digital systems vary in

More information

Data Link Layer: Overview, operations

Data Link Layer: Overview, operations Data Link Layer: Overview, operations Chapter 3 1 Outlines 1. Data Link Layer Functions. Data Link Services 3. Framing 4. Error Detection/Correction. Flow Control 6. Medium Access 1 1. Data Link Layer

More information

SEMICON Solutions. Bus Structure. Created by: Duong Dang Date: 20 th Oct,2010

SEMICON Solutions. Bus Structure. Created by: Duong Dang Date: 20 th Oct,2010 SEMICON Solutions Bus Structure Created by: Duong Dang Date: 20 th Oct,2010 Introduction Buses are the simplest and most widely used interconnection networks A number of modules is connected via a single

More information

The control of I/O devices is a major concern for OS designers

The control of I/O devices is a major concern for OS designers Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices

More information

Inst: Chris Davison

Inst: Chris Davison ICS 153 Introduction to Computer Networks Inst: Chris Davison cbdaviso@uci.edu ICS 153 Data Link Layer Contents Simplex and Duplex Communication Frame Creation Flow Control Error Control Performance of

More information

Microprocessor Architecture

Microprocessor Architecture Microprocessor - 8085 Architecture 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration

More information

UNIT - II PERIPHERAL INTERFACING WITH 8085

UNIT - II PERIPHERAL INTERFACING WITH 8085 UNIT - II PERIPHERAL INTERFACING WITH 8085 Peripheral Interfacing is considered to be a main part of Microprocessor, as it is the only way to interact with the external world. The interfacing happens with

More information

Configurable UART with FIFO ver 2.20

Configurable UART with FIFO ver 2.20 D16550 Configurable UART with FIFO ver 2.20 OVERVIEW The D16550 is a soft Core of a Universal Asynchronous Receiver/Transmitter (UART) functionally identical to the TL16C550A. The D16550 allows serial

More information

Bus System. Bus Lines. Bus Systems. Chapter 8. Common connection between the CPU, the memory, and the peripheral devices.

Bus System. Bus Lines. Bus Systems. Chapter 8. Common connection between the CPU, the memory, and the peripheral devices. Bus System Chapter 8 CSc 314 T W Bennet Mississippi College 1 CSc 314 T W Bennet Mississippi College 3 Bus Systems Common connection between the CPU, the memory, and the peripheral devices. One device

More information

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview CPE/EE 421/521 Fall 2004 Chapter 4 The 68000 CPU Hardware Model Dr. Rhonda Kay Gaede UAH Fall 2004 1 The 68000 CPU Hardware Model - Overview 68000 interface Timing diagram Minimal configuration using the

More information

Lecture / The Data Link Layer: Framing and Error Detection

Lecture / The Data Link Layer: Framing and Error Detection Lecture 2 6.263/16.37 The Data Link Layer: Framing and Error Detection MIT, LIDS Slide 1 Data Link Layer (DLC) Responsible for reliable transmission of packets over a link Framing: Determine the start

More information

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 5 Input/Output Organization Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Accessing I/O Devices Interrupts Direct Memory Access Buses Interface

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Unit DMA CONTROLLER 8257

Unit DMA CONTROLLER 8257 DMA CONTROLLER 8257 In microprocessor based system, data transfer can be controlled by either software or hardware. To transfer data microprocessor has to do the following tasks: Fetch the instruction

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University Chapter 3 Top Level View of Computer Function and Interconnection Contents Computer Components Computer Function Interconnection Structures Bus Interconnection PCI 3-2 Program Concept Computer components

More information

Advantages and disadvantages

Advantages and disadvantages Advantages and disadvantages Advantages Disadvantages Asynchronous transmission Simple, doesn't require synchronization of both communication sides Cheap, timing is not as critical as for synchronous transmission,

More information

Configuration of Synchronous Protocols

Configuration of Synchronous Protocols encor! enetworks TM Version A, September 2010 2013 Encore Networks, Inc. All rights reserved. Configuration of Synchronous Protocols This chapter discusses synchronous protocols that you can configure

More information

PC Interrupt Structure and 8259 DMA Controllers

PC Interrupt Structure and 8259 DMA Controllers ELEC 379 : DESIGN OF DIGITAL AND MICROCOMPUTER SYSTEMS 1998/99 WINTER SESSION, TERM 2 PC Interrupt Structure and 8259 DMA Controllers This lecture covers the use of interrupts and the vectored interrupt

More information

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14 CS 134 Operating Systems April 8, 2013 Lecture 20 Input/Output Instructor: Neil Rhodes Hardware How hardware works Operating system layer What the kernel does API What the programmer does Overview 2 kinds

More information

Input / Output. School of Computer Science G51CSA

Input / Output. School of Computer Science G51CSA Input / Output 1 Overview J I/O module is the third key element of a computer system. (others are CPU and Memory) J All computer systems must have efficient means to receive input and deliver output J

More information

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure EC 6504 Microprocessor and Microcontroller Unit II 8086 System Bus Structure Syllabus: 8086 Signals Basic Configurations System bus timing System Design using 8086 IO Programming Introduction to multiprogramming

More information

INPUT/OUTPUT ORGANIZATION

INPUT/OUTPUT ORGANIZATION INPUT/OUTPUT ORGANIZATION Accessing I/O Devices I/O interface Input/output mechanism Memory-mapped I/O Programmed I/O Interrupts Direct Memory Access Buses Synchronous Bus Asynchronous Bus I/O in CO and

More information

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013 Chapter 13: I/O Systems Overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations

More information

(Refer Slide Time: 2:20)

(Refer Slide Time: 2:20) Data Communications Prof. A. Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture-15 Error Detection and Correction Hello viewers welcome to today s lecture

More information

Chapter 9: Data Transmission

Chapter 9: Data Transmission Chapter 9: Data Transmission MULTIPLE CHOICE 1. In practical terms, parallel data transmission is sent: a. over short distances only c. over any distance b. usually over long distances d. usually over

More information

Digital System Design

Digital System Design Digital System Design by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc350 Simon Fraser University i Slide Set: 15 Date: March 30, 2009 Slide

More information

8051SERIAL PORT PROGRAMMING

8051SERIAL PORT PROGRAMMING 8051SERIAL PORT PROGRAMMING Basics of Serial Communication Computers transfer data in two ways: Parallel Often 8 or more lines (wire conductors) are used to transfer data to a device that is only a few

More information

More on IO: The Universal Serial Bus (USB)

More on IO: The Universal Serial Bus (USB) ecture 37 Computer Science 61C Spring 2017 April 21st, 2017 More on IO: The Universal Serial Bus (USB) 1 Administrivia Project 5 is: USB Programming (read from a mouse) Optional (helps you to catch up

More information

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port).

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port). This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on PIO 8255 (Programmable Input Output Port). 1. Programmable peripheral input-output port is other name for a) serial input-output

More information

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers.

PART A (22 Marks) 2. a) Briefly write about r's complement and (r-1)'s complement. [8] b) Explain any two ways of adding decimal numbers. Set No. 1 IV B.Tech I Semester Supplementary Examinations, March - 2017 COMPUTER ARCHITECTURE & ORGANIZATION (Common to Electronics & Communication Engineering and Electronics & Time: 3 hours Max. Marks:

More information

Data Link Control. Claude Rigault ENST Claude Rigault, ENST 11/3/2002. Data Link control 1

Data Link Control. Claude Rigault ENST Claude Rigault, ENST 11/3/2002. Data Link control 1 Data Link Control Claude Rigault ENST claude.rigault@enst.fr Data Link control Data Link Control Outline General principles of Data Link Control HDLC Data Link control 2 General principles of Data Link

More information

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features

Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features Hello, and welcome to this presentation of the STM32 Universal Synchronous/Asynchronous Receiver/Transmitter Interface. It covers the main features of this USART interface, which is widely used for serial

More information

Integrated Device Technology, Inc Stender Way, Santa Clara, CA Phone #: (408) Fax #: (408) Errata Notification

Integrated Device Technology, Inc Stender Way, Santa Clara, CA Phone #: (408) Fax #: (408) Errata Notification Integrated Device Technology, Inc. 2975 Stender Way, Santa Clara, CA - 95054 Phone #: (408) 727-6116 Fax #: (408) 727-2328 Errata Notification EN #: IEN01-02 Errata Revision #: 11/5/01 Issue Date: December

More information

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY CHAPTER 5 : Introduction to Intel 8085 Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY The 8085A(commonly known as the 8085) : Was first introduced in March 1976 is an 8-bit microprocessor with 16-bit address

More information

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3)

Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3) Direct Link Networks: Building Blocks (2.1), Encoding (2.2), Framing (2.3) ECPE/CS 5516: Computer Networks Originally by Scott F. Midkiff (ECpE) Modified by Marc Abrams (CS) Virginia Tech courses.cs.vt.edu/~cs5516

More information

Universal Serial Bus Host Interface on an FPGA

Universal Serial Bus Host Interface on an FPGA Universal Serial Bus Host Interface on an FPGA Application Note For many years, designers have yearned for a general-purpose, high-performance serial communication protocol. The RS-232 and its derivatives

More information

Interrupt is a process where an external device can get the attention of the microprocessor. Interrupts can be classified into two types:

Interrupt is a process where an external device can get the attention of the microprocessor. Interrupts can be classified into two types: 8085 INTERRUPTS 1 INTERRUPTS Interrupt is a process where an external device can get the attention of the microprocessor. The process starts from the I/O device The process is asynchronous. Classification

More information

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels.

Typical modules include interfaces to ARINC-429, ARINC-561, ARINC-629 and RS-422. Each module supports up to 8 Rx or 8Tx channels. Modular PCI Range of Cards Summary features Modular Architecture Interface compatible with PCI Local bus Specification, revision 2.1, June 1995 2 or 4 Module General Purpose Carrier Cards 8 Channels per

More information

PayLink-IP/232 Configuration Guide 2005 Lava Computer MFG Inc.

PayLink-IP/232 Configuration Guide 2005 Lava Computer MFG Inc. PayLink-IP/232 Configuration Guide 2005 Lava Computer MFG Inc. www.lavalink.com Rev. A07 PayLink-IP/232 Configuration Guide This document describes the configuration features of the PayLink-IP/232. It

More information

Fig.12.5 Serial Data Line during Serial Communication

Fig.12.5 Serial Data Line during Serial Communication Lecture-66 Asynchronous Serial Data Communication A serial data signal is divided into time intervals called bit times as shown in fig.2.5. During each bit time interval (T B ), the signal is either a

More information

Appendix. Pioneering Protocols

Appendix. Pioneering Protocols Appendix Pioneering Protocols STUDENTS STUDYING ancient civilizations and languages often wonder what is the point in studying cultures that no longer exist. How will the way people lived hundreds and

More information

MULTIPROCESSORS. Characteristics of Multiprocessors. Interconnection Structures. Interprocessor Arbitration

MULTIPROCESSORS. Characteristics of Multiprocessors. Interconnection Structures. Interprocessor Arbitration MULTIPROCESSORS Characteristics of Multiprocessors Interconnection Structures Interprocessor Arbitration Interprocessor Communication and Synchronization Cache Coherence 2 Characteristics of Multiprocessors

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 1 (ch13) Shudong Chen 1 Objectives Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information