Sunteți pe pagina 1din 17

PTCDB

Interfacing Techniques

Microcomputer Interfacing

Eng. Sa’id Ibrahim

Lecture 01
Interfaces and Interfacing
Interfaces and Interfacing

Definitions of “interface” from Webster’s Dictionary:

noun: the place at which independent systems meet and act or communicate with each other.
e.g. human - machine interface
digital - analogue interface

terminal - network interface


TTL - CMOS interface
parallel or serial interface

Wikipedia:
In computing, an interface is a shared boundary across which two or more
separate components of a computer system exchange information. The
exchange can be between software, computer
hardware, peripheral devices, humans, and combinations of these. Some
computer hardware devices, such as a touchscreen, can both send and receive
data through the interface, while others such as a mouse or microphone may
only provide an interface to send data to a given system.
Definitions (cont.)

By encyclopedia of PC Magazine


Hardware interface:
an architecture used to interconnect two
pieces of equipment. It includes the design of
the plug and socket, the type, number and
purpose of the wires and the electrical signal
that are passed across them. USB, FireWire,
Ethernet, parallel and serial ports as well as
CompactFlash cards PCI cards and PC cards
are all examples of hardware interface
(devices connected to other devices).
Why is computer interfacing important ?
1) The human - machine interface determines the
ultimate success or failure of many computer-
based systems.

2) Digital systems exist within and must successfully


interact with an analogue natural environment.

Digital - analogue interfaces are unavoidable.

3) Rather than designing digital systems from elementary components, computer


engineers more typically assemble new systems from existing subsystems.
(System Integration)

Interfaces between digital hardware subsystems


and between software modules must be
thoroughly considered.
4) With advances in technology, special attention must increasingly be paid to analogue effects
affecting high-speed “analogue” interfaces.

5) Interfaces are a key area of standardization activity. The choice of standards can have
great competitive implications.

6) Interfacing software is typically tricky and time-consuming to design and test. Much
effort can be saved if proper interfacing techniques are adopted (and poor interfacing
techniques avoided) and good design practices and design strategies.
Typical Interfacing Activities

1) Selecting software/hardware subsystems that can (at least potentially) interact well
with each other.
2) Providing appropriate hardware connections : selecting cabling, connectors, drivers,
receivers, correct termination, etc.
3) Resolving any hardware incompatibilities.
4) Designing custom interface circuitry.
5) Configuring hardware interfaces correctly using low-level software drivers.
6) Interfacing software components correctly; selecting compatible software versions;
7) calling the correct procedures in the correct sequence with the correct parameters.
8) Designing any new software that may be required.
The nature of the interfacing problem

--- physical laws stay the same


-- propagation, noise, and coupling calculations
will not become obsolete

--- the basic strategies in interfacing evolve only


very slowly over time

--- interfacing hardware evolves steadily as more features


are provided and as interface standards change

--- software interfacing is often the greatest challenge:


-- multiple versions of software from multiple
different vendors must be made to work together

-- software typically contains bugs

-- software must typically cope with numerous different hardware


configurations.

-- software lives!
System-Level Interfaces

Human- Digital-
Human Analogue
Users Machine Analogue Environment
Interface Interface

Digital-Digital Interface

Other Digital Systems


Human-machine interface:
Input devices: keyboard, mouse, microphone, camera
Output devices: CRT, printer, light panel, audio amp.

Digital - Analogue Interface:


Input devices: A/D converters, modems, sensors
Output devices: D/A converters, modems, transducers,
actuators, stepper motors
Control devices: switches, multiplexers, amplifiers,
attenuators

Digital - Digital Interface:


Connectors: wires, ribbon cable, coax, twisted pair, PCB
I/O devices: buffers, level-shifters, synchronizers
System-level interfaces:

Human-machine interface

Digital-analog interface
Human user

Digital-digital interface

Analog environment
Other digital systems
Hardware Interfaces within a Personal Computer (PC)

(greatly simplified)
Lab Board

Serial
Port Keyboard
CPU Cache Controller

Main Memory Mouse


Memory Controller

Parallel
Hard Disc Port Printer
Drive Controller Controller

Diskette Diskette Video


CRT
Drive Controller Controller

System Bus
Typical Mechanisms at Interfaces
1) Data buffering and flow control
-- helps compensate for short-term mismatches in
data generation and consumption rates
-- groups data into larger, more efficient chunks

2) Synchronization, handshaking
-- compensates for asynchronous clocks, clock skew
affecting synchronous signals, devices with
different response times
-- bit stuffing to equalize bit rates (telecom technique)
3) Digital processing
-- framing, packet assembly and disassembly
-- data communication protocols
-- encoding, decoding, code conversion
-- error detection and error correction
-- data compression (e.g. using Huffman codes)
4) Analogue signal conversion and conditioning
-- restore correct voltage and current levels
-- restore correct signal rise and fall times
-- pulse-shaping and channel equalization
-- take precautions to reduce noise and reflections
-- carrier modulation and demodulation
1. The Standard Transistor Interfacing Circuit
Many output devices will require a transistor switching circuit. In most cases a
darlington pair formed from two transistors is ideal.
It is possible to buy a device that contains the two transistors in a single package.
This transistor is called the BCX38B, and can switch currents up to 800mA.

Note that it is usual to connect a back emf suppression diode across the output
device. This is essential with devices such as relays, solenoids and motors which
create a back emf when power is switched off. The diode type 1N4001 is the device
recommended.
2. Using a Darlington Driver IC
If a number of output devices are being controlled it may be necessary to use a
number of output transistors. In this case it will often be more convenient to use a
ULN2003 Darlington driver IC. This is simply a 16 pin ‘chip’ that contains 7
darlington transistors similar in value to the BCX38B. The ‘chip’ also contains internal
back emf suppression diodes and so no external 1N4001 diodes are required.
3. The Standard Relay Interfacing Circuit
A relay can be used to switch higher power devices such as motors and solenoids. If
desired, the relay can be powered by a separate power supply, so, for instance, 12V
solenoids can be controlled by the microcontroller. Note the use of a back emf
suppression diode across the relay contacts. This is to prevent damage to the
transistor when the relay switches off. Diode type 1N4001 is suitable for this diode.
4. The Standard FET Interfacing Circuit
Power MOSFETs can be used instead of darlington transistor pairs to switch medium
power devices. The standard MOSFET circuit is shown below. The device IRF530 is a
suitable power MOSFET to use in this circuit.
PTCDB
End Of Lecture

Click to edit company slogan .

S-ar putea să vă placă și