Posts: 2,300
Threads: 878
Joined: Sep 2010
[attachment=7090]
Microcontroller to Sensor Interfacing Techniques
INTERFACING
Interfacing is a term used in electronics when different electronic devices are attached. The term is commonly used when attaching memory chips. Interfacing also often refers to the connection of peripheral devices to computers
MICROCONTROLLER
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.
Posts: 5,362
Threads: 2,998
Joined: Feb 2011
Microcontroller Interfacing Techniques
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.
Parallel Bus
Consists of multiple digital inputs/outputs. Most common types:
•4-bit
•8-bit ( e.g. Centronics )
•16-bit ( e.g. ISA )
•32-bit ( e.g. PCI )
Serial Buses
I2C ( Inter Integrated Circuit bus )
2-wire interface with one master and multiple slaves ( multi-master configurations possible ).
Originated by Philips Semiconductor in the early 80’s to connect a microcontroller to peripheral
devices in TV sets.
Signals: DATA (SDA), CLOCK (SCL) and Ground. SDA is always bi-directional; SCL is bidirectional
only in multi-master mode.
Maximum allowable capacitance on the lines is 400 pF. Typical device capacitance is 10 pF.
To start the communications, the bus master (typically a microcontroller) places the address of
the device with which it intends to communicate (the slave) on the bus. All slave devices monitor
the bus to determine if the master device is sending their address. Only the device with the
correct address communicates with the master.
Start and Stop
An I2C master prepares to communicate with a slave device first by generating a Start condition
on the bus. Start condition is defined as SDA signal going low while SCL signal is high. Stop
condition is defined as SDA going high while SCL is high.
Data Validity
Data can change while the clock is low. Data should remain stable while the clock is going high.
SPI ( Serial Peripheral Interface )
4-wire interface with one master and multiple slaves. Signals: DATA IN, DATA OUT, CLOCK, CS
( Chip Select )
Originated by Motorola, SPI bus is a relatively simple synchronous serial interface for connecting
low speed external devices using minimal number of wires. A synchronous clock shifts serial
data into and out of the microcontrollers in blocks of 8 bits.
SPI bus is a master/slave interface. Whenever two devices communicate, one is referred to as
the "master" and the other as the "slave" device. The master drives the serial clock. SPI is full
duplex: Data is simultaneously transmitted and received.
1-wire
Originated by Dallas Semiconductor ( now part of MAXIM ) to address a variety of peripherals,
sensors, and memory chips from a single wire interface ( DATA and Ground ). One signal wire
carries both operating power and signal. Usually the network is built using a wire pair where one
wire carries the signal and power and the other wire is ground. The system is sensitive to the
right timing to operate well.
download full report
http://bipomapplications/micro_interfacing.pdf