Hardware Overview Continued CSC 370 (Blum) 1 Serial Port Serial DB9 connectors • The serial port is used along with a local communication standard that transmits 1 bit at a time. • It is typically used for (external) modems but sometimes used for digital cameras and other devices. • The standard was used for keyboard and mouse but they usually have special, designated connectors (unless they’re USB). CSC 370 (Blum) 2 Parallel to Serial • Most of the data in the computer moves around in parallel, so to use the serial port the data must be converter to serial format. • This is done by the UART chip associated with the serial port. The chip has a large buffer (some memory) to hold data waiting to be put in serial form. UART chip CSC 370 (Blum) 3 RS 232 and DB-9 • RS 232 is the old standard for local serial communication – data is sent bit-by-bit but grouped into bytes with a start bit and stop bit announcing the beginning and end of the byte. (There are newer standards, but the old name has stuck.) • The standard serial connector is called the DB-9. Only two of the pins are used for data (receiving and transmitting, full-duplex) the rest are for control flow. CSC 370 (Blum) 4 Pin Purposes 1. 2. 3. 4. 5. 6. 7. 8. 9. Carrier Detect - Determines if the modem is connected to a working phone line. Receive Data - Computer receives information sent from the modem. Transmit Data - Computer sends information to the modem. Data Terminal Ready - Computer tells the modem that it is ready to talk. Signal Ground - Pin is grounded. Data Set Ready - Modem tells the computer that it is ready to talk. Request To Send - Computer asks the modem if it can send information. Clear To Send - Modem tells the computer that it can send information. Ring Indicator - Once a call has been placed, computer acknowledges signal (sent from modem) that a ring is detected. CSC 370 (Blum) 5 COM Port • The term COM (communications) port is sometimes used instead of serial port. • COM corresponds to a set of addresses (software instead of hardware) that is associated with the serial port. – In particular COM1 corresponds to IRQ 4 and I/O address 03F8 CSC 370 (Blum) 6 Requesting an interrupt • Devices cannot get the immediate attention of the processor. Instead the device makes an interrupt request. • The processor only allows itself to be interrupted at certain times. • All devices interrupt the processor in the same way, the processor must then trace back to find out which device requested the interrupt. CSC 370 (Blum) 7 IRQ • Devices that interrupt the processor are assigned an IRQ (Interrupt Request Line). • Typically a device has a set IRQ or finds an available IRQ, occasionally two devices want the same IRQ and a conflict arises. • IRQs belong to a category known as System Resources. This category also includes I/O Addresses and DMA. CSC 370 (Blum) 8 To see the IRQ for the serial/COM port Start/Settings/Control Panel CSC 370 (Blum) 9 System CSC 370 (Blum) 10 Hardware Tab/Device Manager CSC 370 (Blum) 11 Expand Ports (COM & LPT)/Double click COM1 CSC 370 (Blum) 12 Resources Tab Resource info CSC 370 (Blum) 13 DIN connector • A DIN connector is one that meets the DIN standards. • DIN stands for Deutsches Insitut für Normung eV, the German version of ANSI, a organization that determines standards. • On PCs DIN connectors are often used for keyboard and mouse. They may also been seen on routers and switches. • The DIN connector for keyboard and mouse are actually mini-DIN connectors with 6 pins. The port was developed by IBM and is called PS/2. CSC 370 (Blum) 14 Parallel Port Female parallel port connector • The parallel port is used along with a local communication standard that transmits 8 bits (a byte) at a time. • It is typically used for printers or scanners but sometimes used for external CD burner or zip drive. CSC 370 (Blum) 15 Pin purposes • Pins 2-9 carry the data. • The other pins have purposes such as indicating if one is ready for data, indicating that data is being sent, acknowledging that data was received, etc. • Pins 18-25 can be used to have full-duplex communication (ability to send data in both directions simultaneously). • The parallel-port standards are known as Enhanced Parallel Port (EPP) for non-printing devices and Extended Capabilities Port (ECP) for improved printing. – (I know, it sounds like it should be the other way around.) CSC 370 (Blum) 16 LPT • The term LPT (Line Printer Terminal) port is sometimes used instead of parallel port. • Like the term COM, LPT corresponds to a set of addresses (software instead of hardware) this time associated with the parallel port. – In particular LPT1 corresponds to IRQ 7 and I/O address 0378 CSC 370 (Blum) 17 USB The USB A connector which plugs into the computer • Universal Serial Bus (USB) is an attempt to have a universal port – a port which has reasonable speed, which many different devices can use at the same time, and which does not require expansion cards. CSC 370 (Blum) 18 A USB socket in the back of the computer. Many computers have USB ports in the front. Some users are confused about the number of USB ports they have – assuming the front and back ports are distinct. The USB B connector plugs into the device. Not that it is distinct from the USB A connector that plugs into the computer. CSC 370 (Blum) 19 Connecting a USB device • Connecting devices that use the serial port, parallel port or expansion slot require the system to be shut down, the device connected and then the system restarted. • USB devices can be added while the system is up. This is known as hot plugging or hot swapping. CSC 370 (Blum) 20 Up to 127 devices • The USB standard supports up to 127 devices. • A typical PC has one of two USB ports, one can connect more USB devices than there are USB ports by using USB hubs or daisy chaining. CSC 370 (Blum) 21 The USB hub shown allows four devices to be connected to one USB port. One can plug a hub into a hub for even more connections. USB hubs may or may need their power depending on the needs of the devices plugged into them. CSC 370 (Blum) 22 USB Cable • A USB connection is simpler hardware than a standard serial connection using a DB9 connector. – It has A two wires for power : +5 volts and ground. So devices that don’t require much power (e.g. a webcam) do not need an independent power source. – It has a twisted pair of wires for carrying the data. CSC 370 (Blum) 23 Enumeration • The PC must detect all of the USB devices and assign them addresses. This is known as enumeration. • The PC also determines the manner in which it will exchange data with the device. – Interrupt: small amounts of data at intermittent times – Bulk: larger chunks of data with error detection – Isochronous: real-time stream of data without eror detection CSC 370 (Blum) 24 Fire Wire • The IEEE 1394 standard is for a fast serial cable that allows up to 63 devices to attach to a single port. • Its high speed and isochronous data transfer make it useful for real-time data streaming. • It supports Plug-and-play and hot plugging. • Originally developed by Apple and known as firewire. Other companies have other names including Lynx and i.link. CSC 370 (Blum) 25 Fire Wire Connector The standard supports a set of cables that have varying numbers of pins. CSC 370 (Blum) 26 Networking Computers • Two standard ways to make a computer part of a network are to use an internal modem or an Ethernet network interface card. • Both use Unshielded Twisted Pair wires. – Twisting reduces interference or cross-talk – Shielding would reduce it more but is more expensive • The plugs used are the RJ-11 (modem) and the RJ-45 (Ethernet NIC) CSC 370 (Blum) 27 RJ-45 • Registered Jack-45, an eight-wire connector used to connect computers to an Ethernet LAN using UTP wire. • RJ-45 connectors look similar to the RJ-11 connectors that are used for phones and modems, but RJ-45s are wider. – Additionally there are two sockets associated with an internal modem. CSC 370 (Blum) 28 RJ-45 (LAN) and RJ-11 (phone) CSC 370 (Blum) 29 Modem with socket for two RJ-11 plugs. UTP Ethernet connection with one RJ-45 plug. CSC 370 (Blum) 30 System Resources • System Resources are the logical/software way to access various devices. It is a level above the hardware but intimately connected to it as it helps the processor to locate and interface with the hardware. • Data is transmitted between the processor and devices using various shared communication channels (the buses). Thus an addressing scheme is required to determine where data is coming from or where it is going, which device is seeking the attention of the processor, and so on. CSC 370 (Blum) 31 Resource Conflicts • Addresses must be unique if there are to be used to distinguish various devices. • If two devices claim the same resource, there is said to be a conflict. • Certain well established devices use a set IRQ. CSC 370 (Blum) 32 IRQ Table CSC 370 (Blum) 33 IRQ Table CSC 370 (Blum) 34 No conflicts CSC 370 (Blum) 35 DMA • Normally a device interacts with memory (reads or writes data) via the processor. • A Direct Memory Access (DMA) channel allows a device to interact with memory without going through the processor. This speeds up data transfers. • There are usually fewer conflicts over DMA than over IRQ. CSC 370 (Blum) 36 Floppy Resource with DMA CSC 370 (Blum) 37 I/O addresses • Every PC device has an Input/Output (I/O) Address or port address. • Standard devices have standard I/O addresses. • These I/O addresses and the memory locations they represent are like mail boxes for devices. Data for a device is sent to that devices I/O Address (mailbox). • This scheme of associating memory locations with devices is known as memory-mapped I/O. CSC 370 (Blum) 38 Keyboard’s I/O address range CSC 370 (Blum) 39 Logical device names • The COM and LPT ports can be located using the various addresses associated with them. However, they can also be referred to by using their name COM1, COM2, LPT1 or LPT2. • This logically higher naming scheme (known as the logical name) allows these ports to be found even without knowing their assigned I/O addresses and/or IRQ. CSC 370 (Blum) 40 Memory Addresses and BIOS shadowing • There is some (ROM) BIOS associated with each device that holds the lowest-level instructions that the PC cannot forget in order to operate. • But main memory (RAM) is faster than ROM, so commonly used, but slow parts of the BIOS are placed in memory to improve speed. This is known as BIOS shadowing. • A device’s Memory Range are memory locations associated with a device to hold its shadowed BIOS. They are placed in what is called “upper memory.” • (Strictly speaking not a system resource.) CSC 370 (Blum) 41 Memory Range for NIC CSC 370 (Blum) 42 Plug-and-Play • System configuration (adding cards, assigning resources used to be technical and tedious). Most modern operating systems support Plug-and-Play (PnP). • With PnP, system resources are assigned automatically and in most cases, conflicts are avoided. CSC 370 (Blum) 43 References • http://computer.howstuffworks.com CSC 370 (Blum) 44