input output n.
Skip this Video
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 18

Input/Output - PowerPoint PPT Presentation

  • Uploaded on

Input/Output. What is I/O?. How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted by the device it is sent to (output) Computer interprets data received (input). Devices. What are devices?. Obvious ones… Mouse Keyboard

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Input/Output' - kalani

Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
what is i o
What is I/O?
  • How we get the CPU to communicate with devices
  • From the computer’s point of view, it’s just 1’s and 0’s
  • Gets interpreted by the device it is sent to (output)
  • Computer interprets data received (input)

What are devices?

Obvious ones…

  • Mouse
  • Keyboard
  • Printer
  • Modem
  • Not so obvious ones…
  • Floppies
  • CD-ROM
  • Hard disc drives
the bus reminder
The Bus - Reminder

A collection of wires which carry data between the CPU, memory and I/O devices

  • Address Bus: carries memory address values from the CPU to the memory and I/O
  • Data Bus: carries all data, including machine codes, in all directions
  • Control Bus: a small number of wires carrying the read/write and enable signals, and a few other ‘control’ signals
i o devices
I/O Devices

Address bus

Data bus

Control bus

Interface between computer’s bus and I/O device

I/O Port

Device-specific communication link


Actual I/O device


These are the devices that actually do the physical input, output and data storage operations.

Examples: keyboard printer

mouse floppy disk

VDU modem

They do not connect directly to the computer’s bus.

A peripheral is anything connected to the computer except the CPU, memory and power supply

i o ports
I/O Ports

These are the devices that provide interfaces between the computer’s buses and the peripherals. In general, they do the following:

  • Recognise when they are being addressed, or selected
  • Provide at least one (but typically at least two) addressable locations that can be read and/or written like a memory location. These locations are called I/O registers, and can be classified into data registers and control registers
i o ports1
I/O Ports
  • Respond to commands from the CPU
    • CPU writes to the control registers
  • For input devices: transfer data from device to input data registers
    • CPU can then read data from these registers
  • For output devices: transfer data from data registers to device
    • CPU will have already written data to registers
i o ports2
I/O Ports
  • Provide a variety of protocols for data transfer to and from the peripheral, all under CPU control
  • Provide status and error information to the CPU e.g. ready, broken, run out of paper etc
  • Issue interrupts to signal the occurrence of certain events (e.g. data received), as specified by the CPU (more later)
parallel and serial interfaces
Parallel and Serial Interfaces

I/O ports can be classified according to the type of interface they implement. The two commonest are:-

  • parallel interface

(e.g. to a printer)

  • serial interface

(e.g. to a VDU or modem)

parallel interface typical
Parallel Interface (typical)

Think: pins on a printer cable before USB!

example protocol handshake
Example protocol: Handshake

RDY: sender says data is ready

ACK: receiver acknowledges receipt

the handshake
The Handshake

Receiver acknowledges receipt

Sender stops asserting data ready

Receiver acknowledges transmission over

Sender asserts data ready

Sender puts data on lines

the serializer
The Serializer

The serializer takes the (8 bits of) input, and translates them to a single stream of data

It tells the CPU (status and control register) when data transmission is complete

It reads from the status & control register information about how to format the data, and what speed to send it

  • A bit different…
  • Four wires
    • Two for data transmission
    • One for ground
    • One for voltage (+5V)
  • Data sent in packets, addressed to destination
  • Lower noise, fewer errors => faster data transfer than traditional serial and parallel ports
  • Like USB but better
    • Nearly twice as fast (USB2.0=480Mb/s; Firewire800=800Mb/s)
    • Allows longer cables (USB2.0 max 4.5m; Firewire 100m
  • And also more expensive
    • Which is why, although Firewire has been around since 1995 (Apple created it), USB is more used
  • For really fast connections (e.g. video) Firewire is best; for others, it doesn’t matter
test yourself
Test Yourself!
  • Think of some peripherals. Do they use serial or parallel interfaces?
  • What is an I/O port?
  • How does handshaking work?
  • Can you draw a timing diagram for parallel interface handshaking?
  • What about the serial interface?