Each microcontroller is different in its architecture but
the interfaces it connects with remain same. For example simple LEDs are used
to indicate status of some gadget like set top box, satellite receiver, energy
meter, UPS, etc. These gadgets are built using some microcontrollers but all
uses variety of microcontrollers. You may also find some beep generated from
almost every gadget, and a buzzer is used inside to do this. Thus a buzzer is
interfaced with some microcontroller. This tutorial will walk through various
interfaces, which are used commonly now.
Before we get into details of the interfaces, let’s
understand some basic questions like:
What
is an interface?
What
is interfacing?
An interface is either Input device, or output device, or a
storage device, or processing device.
Input devices are used to provide some data to the
microcontroller.
e.g. Switch, 4x4 Keypad Matrix,
Infrared sensor, Temperature sensor, Light Sensor etc. These devices provide
some input to the microcontroller, and this input is called as data.
Output devices are used to present the processed data
to user or other equipment.
e.g. LED, LCD, Buzzer, Relay driver, DC Motor Driver, Stepper Motor driver,
7-Segment Display etc. These devices convert
the processed data to such a format, which is understandable by human or other
equipment.
Storage Devices are used to store the data, normally
it is expected to store the data even if the power is switched off. Some of the
storage devices are SD/MMC card, EEPROM,
DataFlash, Real Time Clock, etc. These interfaces are used retain the data and
this data can be used as and when required by the microcontroller for further
processing
This Microcontroller tutorial for interfacing techniques
will now explain you the meaning of interfacing:
Interfacing is a method to establish communication
between Microcontroller and the Interface. Various interfaces are listed
above. These interfaces are generic and can communicate with any
microcontroller. Interfacing is a combination of hardware (i.e. the
Interface) and Software (i.e. the source code to communicate, also called as
the Driver). In simple words, to
use LED as output device, LED should be connected to a port pin of the
microcontroller and there has to be a program running inside the
microcontroller to make it On or Off or blink or dim. This program is called as
the driver and can be developed using any programming language like
Assembly, C, Basic etc.
If you are totally new / beginner to the microcontrollers
and are interested in learning this exciting technology then, Kit + Distance Learning is suggested for you. This
includes hardware + software + Tutorials + technical help via email.
If you have someone to teach or you know the technology and
have very low budget then these low cost boards
will be suitable for you. Remember that these boards are not recommended for
beginners, as they do not have any tutorial and technical support.
By now you know that Interfacing is a process to
write a firmware (i.e. source code program) for the microcontroller. These are
the steps one should follow for interfacing:
Read
the datasheet of Interface.
Understand
the expected data format of communication
Understand
the voltage requirements
Understand
the electrical specifications and design guidelines
A simple LED normally requires 0 or 5V to on / off. This is
called as digital signal.
A buzzer beep similar to LED but can be beeped even with
intermediate voltage levels between 0 to 5V. This variable voltage input is
called as analog signal.
A temperature sensor LM35 generates analog voltage in proportion
to the temperature. This analog voltage needs to be connected to Analog Port
pin of a microcontroller for processing temperature data.
Ethernet controller modulerequires
SPI data format to interface with any microcontroller. SPI is a complex digital
communication format.
Thus every interface is unique in its interfacing
standards, but they are same at par with all microcontrollers.