lec12 - castlecollegeHE

advertisement
phones off (please)
Interfacing and I/O Peripherals
Dr John Cowell
CSCI1412-HW-5
1
Overview
 Interface mechanisms
 buses: ISA / PCI, PCI Express, USB, AGP
 interface cards, PCMCIA
 Input devices
 keyboards, mice, joysticks, light pens, bar codes, magnetic
card reader, OCR, scanner, microphone
 Output devices
 VDU, printers, plotter
 speakers
CSCI1412-HW-5
2
CSCI1412-HW-5
3
Buses
 What is a bus?
 an electronic traffic lane through which electrical signals are
carried from one chip to another chip
 most often used in the context of communication between
the processor and other system components
 there are many different kinds of bus including ISA, EISA,
MCA,SCSI and the local bus standards PCI and VL-Bus

quoted from www.pctechguide.com
CSCI1412-HW-5
4
A Potential Bird’s Nest
 Imagine connecting four chips to each other
Now try to imagine what would happen with twenty chips!
CSCI1412-HW-5
5
The Bus Solution
slots for
extra
peripherals
the bus
 A bus comprises the actual physical components (wires,
connectors, chips) and a set of protocols defining how it is
used (timing, access methods)
CSCI1412-HW-5
6
The System Bus
 The connection between the microprocessor and RAM is
the most important bus
 it is made up of three component buses which are collectively
known as the system bus or Front Side Bus



address bus (location of memory)
data bus (values to / from memory)
control bus
 the system bus is now 64 bits wide
 64 ‘wires’ in parallel
 runs at speeds up to 1600 MHz on an Intel i7
 short, delicate, single purpose
CSCI1412-HW-5
7
The ISA bus
 The ISA (Industry Standard Architecture) bus was
incorporated in the first IBM PC
 standard used to attached to peripherals and the expansion
slots


originally 4.77 MHz, now 8 MHz
now 16 bit
 it was the fact that it was published as an open standard and
was flexible enough to connect a wide variety of expansion
cards that was the main reason for the success of the IBM PC
 still used today, although Intel and Microsoft have decreed
that it is to be abolished
CSCI1412-HW-5
8
EISA / MCA
 As the ISA bus was so slow (and because it was a fixed
standard), there were some attempts to improve or enhance
it
 MCA (Micro Channel Architecture) from IBM
 32 bit, 10 MHz
 incompatible with ISA and not supported by Intel/MS
 therefore died out!
 EISA (Extended ISA)
 32 bit, 8 MHz
 extended (32 bits v. 16) but still compatible
 successful for a while, but now superceded
CSCI1412-HW-5
9
PCI
 Intel created a new standard: PCI (Peripheral Component
Interface)
 32 bit or 64 bit, originally 33Mhz, now 66 MHz
 fixed, independent of processor speed
 robust, upgradeable, reliable, compatible
 plug and play
 Intel and MS defined a specification to allow peripherals to be
automatically detected and configured by the PC, rather than by the
user
 In ‘Express format’ now the standard for high speed
peripherals

hard disk and graphics controllers
CSCI1412-HW-5
10
SCSI / SCSI-2
 The SCSI (Small Computer System Interface) bus was
defined by ANSI in 1986
 used widely in non IBM-PC (esp. UNIX, Macs)
 originally designed for hard disk drives, now extended to CD-
ROM’s, scanners, faxes, etc

SCSI-1: 8 bit, SCSI-2: 16 bit
 can be incorporated into PC’s using a SCSI card
 commands issued at a higher level
 e.g. use logical block address (not physical location)
 SCSI devices need termination with resistors
 jumper connections on SCSI device
CSCI1412-HW-5
11
AGP and PCI Express
 AGP used on older PCs for graphics - AGP 8x 2,100 MB/s
 Peripheral Component Interconnect Express - PCI Express ,a standard






for graphics applications (replacing AGP)
Sometimes called PCI-E or PCIe
Developed by Intel in 2004
PCI Express is serial and can transmit data in two directions at the
same time. PCI is parallel and can only transit in one direction.
Communication via lanes, each lane is a unidirectional point to point
serial link
Physical PCIe slots may contain 1-32 lanes in powers of 2, e.g.
1,2,4,8,16,32.
Data is interleaved - successive byte are sent down successive lanes.
CSCI1412-HW-5
12
PCIe - 1
In PCIe 1.1 released in 2004 each lane carried 250 MB/s
 PCIe 2.0 released in late 2007 – 500MB/s
 PCIe 3.0 due for release in 2010 – 1 GB/s
As the number of lanes increase the transfer rate increases
 PCI Express 1x 250 [500] MB/s
 PCI Express 2x 500 [1000]MB/s
 PCI Express 4x 1000 [2000] MB/s
 PCI Express 8x 2000 [4000] MB/s
 PCI Express 16x 4000 [8000] MB/s
 PCI Express 32x 8000 [16000] MB
An 8-lane PCIe 2.o carries as much as the fastest AGP
CSCI1412-HW-5
13
PCIe - 2
 All new graphics cards are now PCIe
 NVIDIA uses PCIe in its Scalable Link Interface (SLI)
technology, to allow multiple graphics cards of the same
chipset and model number to be run in tandem.
 ATI also has developed a multi-GPU (Graphics Processing
Units) system based on PCIe called CrossFire.
 AMD and NVIDIA released motherboard chipsets which
support up to four PCIe x16 slots, allowing tri-GPU and
quad-GPU card configurations.
CSCI1412-HW-5
14
PCMCIA
 The PCMCIA (Personal Computer Memory Card
International Association) is both an organisation and a
standard for the expansion of portables (laptops,
handhelds, etc)
 loose collaboration of hardware and software industries
rather than a single organisation
 originally a 16 bit standard, now 32 bit
 not really a true bus, more of a total interface specification
including hardware design and software services


can handle RAM, disks, graphics
very flexible, generic, handles ‘hot-swapping’
CSCI1412-HW-5
15
USB - 1
The problem
 Many different types of ports:
 serial ports, parallel ports,
 keyboard and mouse connections,
 joystick ports,
 midi ports etc.
Requirements
 A way of connecting large numbers of devices.
 To replace legacy ports.
 Does not require specific interrupt resources
 ‘Hot-pluggable’.
 Plug and Play.
 The Universal Serial Bus (USB) developed as a solution
 Specification developed by Compaq, Intel, Microsoft and NEC, joined later by Hewlett-
Packard, Lucent and Philip.
 The USB Implementers Forum, Inc as a non-profit corporation to publish the
specifications and organise further development in USB.
CSCI1412-HW-5
16
USB-2
 Universal Serial Bus (USB) is replacing serial ports
 Three data speeds,
 Low Speed – 1.5Mbits/s
 This was intended for cheap, low data rate devices like mice. The low speed




captive cable is thinner and more flexible than that required for full and high
speed.
Full Speed - 12MBit/s
This was originally specified for all other devices.
High Speed – 480Mbits/s
The high speed additions to the specification were introduced in USB 2.0 as a
response to the higher speed of Firewire.
 These speeds are the fundamental clocking rates of the system, and as such do not represent
possible throughput, which will always be lower as the result of the protocol overheads.
CSCI1412-HW-5
17
USB - 3
 USB has a 'tiered star topology' in which there is a single
host controller and up to 127 'slave' devices.
 Because the address field in a packet is 7 bits long, and the
address 0 cannot be used as it has special significance.
 The host controller is connected to a hub, integrated within
the PC, which allows a number of attachment points (often
loosely referred to as ports).
CSCI1412-HW-5
18
USB - 4
If 127 devices is not enough !
 A further hub may be plugged into
each of these attachment points.
 A device can be plugged into a hub,
and that hub can be plugged into
another hub and so on. M
 Maximum number of tiers is six.
 The length of any cable from hub to
device is 5 metres.
 Could extend up to 30m with 6 tiers.
 For greater distances use another
form of connection such as Ethernet.
CSCI1412-HW-5
19
USB - 4
 At any point in time, only the host OR one device can be
transmitting at a time.
 When the host is transmitting a packet of data, it is sent to
every connected device. Only one device, the addressed
one, actually accepts the data. (The others all receive it but
the address is wrong for them).
 One device at a time is able to transmit to the host, in
response to a direct request from the host.
CSCI1412-HW-5
20
CSCI1412-HW-5
21
Input/Output Devices
 In essence input and output devices allow us (the users) access
to the bits in the computer
 input devices
 convert information from human / analogue form into digital
 takes control information from the user
 output devices
 convert information from computer to human usable form
 provides control information to the user
 Human computer interaction (HCI) is the study of how we
interact with computers
 e.g. the mouse: developed in mid 70’s by Xerox
 ergonomic design tries to improve our HCI
CSCI1412-HW-5
22
Keyboards
 The original ‘qwerty’ keyboard was designed to deliberately
slow typists down
 mechanical typewriters couldn’t keep up!
 common letters put close together so that the same finger must be
used (which is slow)
 common letters away from ‘home’ positions (F/J)
 There are other arrangements of letters
 ‘dvorak’ arranged to enhance speed
 Many variations on the basic theme
 ergonomic styles, such as MS natural
 numeric keypads, function and control keys
 foreign keyboards with special keys (accents, etc)
CSCI1412-HW-5
23
How Keyboards Work
 The keys are arranged in a grid of wires
 a key press connects vertical to horizontal
 this is translated into a key number

later translated by the OS into the character value
Q
W
E
R
A
S
D
F
– often the switches are
mechanical
– sometimes more basic
• conductive membrane
– different weights
Z
X
C
CSCI1412-HW-5
V
• how hard to press
• clicks v. soft feel
24
Mouse
 There are a wide variety of types of mouse
 Right and left handed
 Foot operated.
 Virtually all have USB interface
 Wide configuration of buttons (e.g. For web navigation, giving
presentations)
 Pseudo mice type devices e.g. Tracker balls, tracker pens
 Increasingly cordless with Bluetooth interface.
 Virtually all mice are optical
 An LED produces red light which hits a surface and is reflected back onto
a sensor.
 The sensor sends the image to a Digital Signal Processor DSP for analysis.
 The DSP determines the speed and degree of movement.
 Latest versions use a laser for better tracking and less sensitivity to
surfaces.
CSCI1412-HW-5
25
Scanners
 A scanner takes an image and makes a digital representation of
that image
 there are two main types of scanner
 hand held: the user moves the scanner over the image
 flat bed: image is placed on scanner: lens moves
 either of which can scan the image in
 colour or black & white
 different resolutions (dots per inch: dpi)
 there is a wide variety of software formats for storing the final
image


JPEG, TIFF, BMP, GIF, PNG, PCX, FAX (+more!)
image processing software can manipulate & convert
CSCI1412-HW-5
26
How a Scanner Works
 Light is shone onto paper, and reflections are received by
light sensitive diodes
A light source illuminates the paper
placed on the scanner’s glass plate:
blank or white areas reflect more light
The scanner’s lens passes light
onto light-sensitive diodes which
translate it into electrical current
CSCI1412-HW-5
The scan head moves below
the paper and receives the
light reflected from the paper
The light is reflected
by a series of mirrors
© pctechguide
27
Other Optical Devices
 Optical character recognition (OCR) is now usually
software (often bundled with scanner)
 coverts the bits representing the image into a sequence of
letters e.g. for a word processor


now very accurate for good quality typed characters
still quite poor at handwriting (needs training)
 Optical mark readers (OMR) are often dedicated hardware
scanner & software
 rather than scanning the whole image, the OMR simply looks
for marks in preset positions

e.g. multiple choice exams, national lottery
CSCI1412-HW-5
28
Bar Codes
Groceries
(UPC) - A
check digit
goods category
product code
manufacturer code
centre bar guards
 There are many different encoding schemes
 UPC (groceries), ISBN (books), Code 39 (parcels)
 Readers shine a laser at the bar code and detect the
reflections received
 there are many physical forms of readers

wands, guns, cards, prismatic (supermarket checkouts)
CSCI1412-HW-5
29
Sound & Voice Recognition
 Many people have recognised the fact that typing is slow and
laborious.
 Recent developments have made speech to text and text to
speech applications more common.
 Text to Speech is more easy to achieve, but voices sound
monotonous.
 This has been a part of MS development environments since 2005.
 Speech to text is more complex.
 A speech to text engine is included part of MS Visual Studio 2008
 Success rate on untrained users is about 70%
 Great improvements after training.
 Not suitable for critical applications.
CSCI1412-HW-5
30
Magnetic Devices
 Magnetic ink character recognition (MICR)
 specially shaped letters in magnetic ink

the funny looking numbers on the bottom of cheques
 read directly by a special purpose scanner
 Magnetic strip readers
 these are pervading all aspects of everyday life

credit / bank / store cards, ID cards
 bits are encoded as polarities on the magnetic strip on the
back of the card
CSCI1412-HW-5
31
CSCI1412-HW-5
32
Output Devices
 In general output devices are conveying information (in
usable form) to the user
 Monitor : the screen
 our main view of the computer: moving images
 printer
 Laser or ink-jet are the dominant technologies
 plotter
 specialised type of printer, usually for large size printing e.g.
Architectural drawings
 loudspeakers
 providing sound, e.g. speech, games
CSCI1412-HW-5
33
Sound
 There are two main components concerned with producing
sound from a computer
 sound card
 the sound card is the device which turns bits of information into electrical
signals to drive speakers
 speakers
 convert electrical signals into sound (vibrations of air)
 stereo: different sound out of each speaker
 tweeters: high-frequency, woofers: low-frequency
 Unlike audio CD’s there are many different ‘standards’ used for
encoding sound in bits
 wav, midi, mpeg, mp3
CSCI1412-HW-5
34
Summary
 Interface mechanisms
 buses: ISA / PCI, PCI Express, USB
 interface cards, PCMCIA
 Input devices
 keyboards, mice, joysticks, light pens, bar codes, magnetic
card reader, OCR, scanner, microphone
 Output devices
 VDU, printers, plotter
 speakers
CSCI1412-HW-5
35
Download