Documente Academic
Documente Profesional
Documente Cultură
Interfacing Techniques
Microcomputer Interfacing
Lecture 01
Interfaces and Interfacing
Interfaces and Interfacing
noun: the place at which independent systems meet and act or communicate with each other.
e.g. human - machine interface
digital - analogue 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.)
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
-- software lives!
System-Level Interfaces
Human- Digital-
Human Analogue
Users Machine Analogue Environment
Interface Interface
Digital-Digital Interface
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
Parallel
Hard Disc Port Printer
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