Interfacing Techniques
Document Revision: 1.01
Date: 3rd April, 2005
16301 Blue Ridge Road, Missouri City, Texas 77489 USA
Telephone: 1-713-283-9970 Fax: 1-281-416-2806
E-mail: info@bipom.com
W eb: www.bipom.com
This document is available for download from www.bipom.com
Overview
Micro-controllers are useful to the extent that they communicate with other devices, such as sensors, motors, switches, keypads, displays, memory and even other micro-controllers.
Many interface methods have been developed over the years to solve the complex problem of balancing circuit design criteria such as features, cost, size, weight, power consumption, reliability, availability, manufacturability.
Many microcontroller designs typically mix multiple interfacing methods. In a very simplistic form, a micro-controller system can be viewed as a system that reads from (monitors) inputs, performs processing and writes to ( controls ) outputs.
Input Devices
Microcontroller
Output Devices
Microcontroller Interfaces
Digital
On/Off
Analog
Parallel
Serial
Asynchronous
Voltage
Synchronous
1-wire
2-wire (I2C)
RS232/RS485
Ethernet
4-wire (SPI, Microwire)
Page 2
Current
Digital Inputs/Outputs
On/OFF control and monitoring.
Advantages
•
•
•
•
Disadvantages
Simplest interface
Lowest-cost to implement
(built into the microcontroller)
High speed
Low programming overhead
•
•
•
Only on/off control/monitoring
Short distance, few feet maximum.
Single device control/monitoring
Digital Input Example: Reading the status of buttons or switches
Single-ended
(non-matrix) switches
P2.7
P2.6
P2.5
8051
Microcontroller
(AT89C51ED2)
P2.4
P2.3
P2.2
P2.1
P2.0
Digital Input Example: Keypad Interface
4X4 Matrix Keypad
Interface
Columns
P2.7
P2.6
Columns
P2.5
8051
Microcontroller
(AT89C51ED2)
1
2
3
A
4
5
6
B
7
8
9
C
*