1 / 41

HARDWARE INTERFACING

HARDWARE INTERFACING. What is an Interface. An interface is a system consisting of hardware, software, or both that allows two dissimilar components to interact. What is Hardware Interfacing. Hardware interfacing means the interface between computer and any device or circuits.

Télécharger la présentation

HARDWARE INTERFACING

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HARDWARE INTERFACING

  2. What is an Interface An interface is a system consisting of hardware, software, or both that allows two dissimilar components to interact.

  3. What is Hardware Interfacing • Hardware interfacing means the interface between computer and any device or circuits. • There are three ways for hardware interfacing. • Printer port ( Parallel port ) • Serial port • USB port

  4. Printer Port A PC printer port is an inexpensive and yet powerful platform for implementing projects dealing with the control of real world peripherals. There are 25 pins in printer port. They are divided into different category. (1) 8 Output pins (2) 5 Input pins (3) 4 Control pins (4) 8 Ground pins To definitively identify the assignments for a particular machine, use the DOS debug program to display memory location 0040:0008.

  5. For example: Debug -d 0040:0008 L8 0040:0008 78 03 78 02 00 00 00 00 In above example that LPT1 is at 0x378, LPT2 is at 0x278 and LPT3 and LPT4 are not assigned. An alternate technique is used to run Microsoft Diagnostics ( MSD.EXE ) and review the LPT assignments.

  6. PROGRAM TO OBTAIN ADDRESSES OF PRINTER PORTS #include <stdio.h> #include <dos.h> void main(void) { unsigned int far *ptraddr; /* Pointer to location of Port Addresses */ unsigned int address; /* Address of Port */ int a; ptraddr=(unsigned int far *)0x00000408; for (a = 0; a < 3; a++) { address = *ptraddr; if (address == 0) printf ("No port found for LPT%d \n", a+1); else printf("Address assigned to LPT%d is %Xh\n", a+1,address); *ptraddr++; }}

  7. Pin Assignment 8 output pins accessed via the DATA Port 5 input pins (one inverted) accessed via the STATUS Port 4 control pins (three inverted) accessed via the CONTROL Port The remaining 8 pins are grounded Output pins Input pins Control pins 25-way Female D-Type Connector

  8. HARDWARE PROPERTIES

  9. The IEEE 1284 standard specifies 3 different connectors to use with the Parallel Port. The first one, 1284 Type A which is the D-Type 25 pins connector found on the back of most computers. The 2nd is the 1284 Type B which is the 36 pins Centronics Connector found on most printers. IEEE 1284 Type C however, is a 36 pins conductor connector like the Centronics, but smaller. There are eight outputs on the Data port and four additional outputs on the low nibble of the Control port. /Select In, Init, /Auto feed and /Strobe. With /Select In, the “in” refers to the printer. For normal printer operation, The PC exerts a logic Zero to indicate to the printer is selected. The function of INIT was to initialize the printer, AUTO FEED to advance the paper. In normal printing, STROBE is high. The character to be printed is output on the Data port and STROBE is momentarily brought low.

  10. INTRODUCTION TO PARALLEL PORTS If you have a printer connected to your computer, there is a good chance that it uses the parallel. While USB is becoming increasingly popular, the parallel port is still a commonly used to interface for printers. Parallel ports can be used to connect a host of popular computer peripherals: Printers Scanners CD burners External hard drives Iomega Zip removable drives Network adapters Tape backup drives The Parallel Port is the most commonly used port for interfacing home made projects. This port will allow the input of up to 9 bits or the output of 12 bits at any one given time, thus requiring minimal external circuitry to implement many simpler tasks.

  11. Parallel Port’s are standardized under the IEEE 1284 standard first released in 1994. This standard defines 5 modes of operation, which are as follows, 1. Compatibility Mode. 2. Nibble Mode. (Protocol not Described in this Document) 3. Byte Mode. (Protocol not Described in this Document) 4. EPP Mode (Enhanced Parallel Port). 5. ECP Mode (Extended Capabilities Mode). Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware, which can run at faster speeds. Compatibility mode is commonly known as the "Centronics Mode" which can only send data in the forward direction at a typical speed of 50 Kbytes per second but can be as high as 150+ Kbytes a second. In order to receive data, you must change the mode to either Nibble or Byte mode. Nibble mode can input a nibble (4 bits) in the reverse direction. E.g. from device to computer. Byte mode uses the Parallel's bi-directional feature (found only on some cards) to input a byte (8 bits) of data in the reverse direction.

  12. Port Addresses LPT Addresses in the BIOS Data Area

  13. Codes for Data Port

  14. CONTROLLING SOME REAL LIFE ELECTRONICS Circuit to operate DC devices Device c BC547A OR 2N2222A IN4007 Parallel port data pi b + a 9v, 12v, 15v Parallel port ground pin

  15. Circuit to operate AC devices 230v (-ve) Inputs R c IN4007 BC547A or 2N2222A b Parallel port data pi Device 6v 230v (+ve) a Structure of Relay Parallel port ground pin

  16. PC TO PC FILE TRANSFER Objective Description Details

  17. Serial Port The advantages of using serial data transfer rather than parallel

  18. THE SERIAL CONNECTION

  19. Rs-232 Serial (Com) Pc Port Connector Db-9 • DB-9 PIN (Male) FUNCTION ABBREVIATION • 1 --------------------------- Data Carrier Detect CD or DCD • 2 --------------------------- Receive Data RD or RX • 3 --------------------------- Transmitted Data TX or TD • 4 --------------------------- Data Terminal Ready DTR • 5 --------------------------- Signal Ground GND • 6 --------------------------- Data Set Ready DSR • 7 --------------------------- Request To Send RTS • 8 --------------------------- Clear To Send CTS • 9 --------------------------- Ring Indicator RI • Transmitted and receive data are referenced from the data device and not the modem.

  20. Rs-232 Serial (Com) Pc Port Connector Db-25 • DB-25 PIN (Male) FUNCTION ABBREVIATION • 1 ------------------------- Chassis/Frame Ground GND • 2 ------------------------- Transmitted Data TX or TD • 3 ------------------------- Receive Data RX or RD • 4 ------------------------- Request To Send RTS • 5 ------------------------- Clear To Send CTS • 6 ------------------------- Data Set Ready DSR • 7 ------------------------- Signal Ground GND • 8 ------------------------- Data Carrier Detect DCD or CD • 9 ------------------------- Transmit + (Current loop) TD+ • 11 ----------------------- Transmit - (Current Loop) TD- • 18 ----------------------- Receive + (Current Loop) RD+ • 20 ----------------------- Data Terminal Ready DTR • 22 ----------------------- Ring Indicator RI • 25 ----------------------- Receive - (Current Loop) RD- • NOTE!! Current loop technology was supported in the PC and XT interfaces. • Current loop was discontinued when the AT interface was introduced. • Transmitted and receive data are referenced from the data • device and not the modem.

  21. 9 PIN to 9 PIN Serial Cable 25 PIN to 9 PIN Serial Cable

  22. D Type 9 Pin and D Type 25 Pin Connectors

  23. Pin Functions Abbreviation Function

  24. Port Addresses & IRQ's Above is the standard port addresses. These should work for most P.C's. COM Port Addresses in the BIOS Data Area

  25. USB PORT A universal serial bus port, introduced around 1997 you can connect as many as 127 devices to a USB port. It can transfer data to a speed of 12 megabits per second, but those 127 devices have to share that speed. In 2003, USB 2.0 connectors were introduced on computers. These transfer data at 480 Mbps. USB 2.0 devices also work with older USB ports, again at the lower speed. USB 2.0 is useful for adding external hard drives like Maxtor drive.

  26. USB PERIPHERALS A sample list of USB devices that you can buy today includes: Printers Scanners Mice Joysticks Flight yokes Digital cameras Web cams Scientific data acquisition devices Modems Speakers Telephones Video phones Storage devices such as Zip drives Network connections

  27. A typical USB connector "B" connection "A" connection

  28. HOW USB PORTS WORK There are two wires for power -- +5 volts (red) and ground (brown). A twisted pair (yellow and blue) of wires to carry the data.

  29. Universal Serial Bus Features The computer acts as the host. Up to 127 devices can connect to the host, either directly or by way of USB hubs. Individual USB cables can run as long as 5 meters; with hubs, devices can be up to 30 meters (six cables' worth) away from the host.  With USB 2, the bus has a maximum data rate of 480 megabits per second. A USB cable has two wires for power (+5 volts and ground) and a twisted pair of wires to carry the data. •  On the power wires, the computer can supply up to 500 milliamps of power at 5 volts.

  30. USB 2.0 The standard for USB version 2.0 was released in April 2000 and serves as an upgrade for USB 1.1. USB 2.0 (High-speed USB) provides additional bandwidth for multimedia and storage applications and has a data transmission speed 40 times faster than USB 1.1.

  31. USB CONVERTER USB to Serial Converter USB to Parallel Converter 25-pin or 36-pin connector. USB to PS/2 and ADB converter

  32. USB to SCSI-2 Converter USB 2.0 to IDE/ATAPI Converter USB to Game port Converter USB to IRDA Converter

  33. CONNECT 4 SERIAL DEVICES BY USB Features:  Provides four RS-232 male DB9 ports for direct connection to serial devices  Supports data rates up to 230 Kbps per port  Five year warranty

  34. USB CABLES DATA AND EXTENSION USB Link Cable USB 2.0 Link Cable All software and drivers are included with the cable.

  35. USB Extension Cable USB 2.0 Extension Cable USB Network Cable

  36. USB HUBS A typical USB four-port hub

  37. USB 2.0 Ultra Slim 4-Port Hub USB 2.0 4-Port Hub USB 2-Port Compact Hub

  38. USB COMPUTER PERIPHERALS Multimedia Keyboard with USB Hub USB Wireless Mouse

  39. USB Data Storage and Memory Cards USB Flash Drives 40, 60 & 80 GBUSB 2.0 Hard Drives 6-in-1 USB 2.0 Memory Card Reader 5-in-1 Memory Card Reader

  40. THANK YOU QUESTION ?

More Related