0% found this document useful (0 votes)
103 views9 pages

Unit Iv - The Microcontroller Connections 1.hardware Interface Sequencing

The document discusses various hardware connections and interfaces used in microcontroller systems. It covers topics like I/O ports that allow microcontrollers to communicate with external devices through inputs and outputs. Specific interfaces and components discussed include serial ports, RAM with address and data ports, LEDs, LCD displays with data and control ports, and pulse-width modulation (PWM) for power control. Microcontrollers require both hardware interfaces and software drivers to facilitate control of peripheral devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views9 pages

Unit Iv - The Microcontroller Connections 1.hardware Interface Sequencing

The document discusses various hardware connections and interfaces used in microcontroller systems. It covers topics like I/O ports that allow microcontrollers to communicate with external devices through inputs and outputs. Specific interfaces and components discussed include serial ports, RAM with address and data ports, LEDs, LCD displays with data and control ports, and pulse-width modulation (PWM) for power control. Microcontrollers require both hardware interfaces and software drivers to facilitate control of peripheral devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

UNIT IV - THE MICROCONTROLLER CONNECTIONS

1.Hardware interface sequencing


 Microcontroller-based systems require the design of a hardware/software
interface that enables software running on the microcontroller to control
external devices.
 This interface consists of the sequential logic that physically connects the
devices to the microcontroller and the software drivers that allow code to
access the device functions.
 Microcontrollers are microprocessors with integrated general-purpose
interfacing logic to facilitate the control of peripheral devices.
 This logic is encapsulated in I/O ports (i.e., collections of I/O pins and
related interface logic) that can be written to or read from by program
code.
 Microcontrollers are commonly used to implement digital control
systems because they require minimal interfacing hardware.
 The computer sends commands to the microcontroller via the serial port.
 The pins are organized in 32 groups of eight.
 The controller communicates with 32 8-bit bidirectional latches
connected to these pins.
 This example is a phonebook with a dialer. Names and phone numbers
are downloaded into RAM via the serial port.
 The RAM has a 14-bit address port, an 8-bit data port, a read enable port,
and a write enable port. The UART has a data-in port and a data-out port.
 The three control ports are write, enable, and read.

2. Prototyping with the PIC micro microcontroller

 A prototype is a first full size functional model of a product to be


manufactured. It details the model to be replicated or learned from and
serves to provide specifications for a real, working system rather than a
theoretical one.
 Phidgets is a modular system of sensor controllers, motor controllers,
RFID readers, and other special function devices, all united by a common
USB interface and a set of desktop software APIs.
 Each Phidget device is a self-contained electronic device, whether it’s a
sensor, motor or LED controller, or a more complex device like an LCD
display.
 The user needs almost no knowledge of electronics to use Phidgets.
 Each device is connected to a desktop computer in order to access its
sensor data or to control it.
 The daeman tool software can be used with other hardware platforms, as
long as that hardware is running a firmware that can communicate in the
daeman tool protocol.
 Wiring, Arduino and Phidgets hardware have been used with daeman
tool.
 The software is written in Java as a plugin for the Eclipse universal tool
platform, and can theoretically run on any Java-capable operating system
tools in an open source platform.
 Moving down a level of abstraction, there are a number of mid-level
microcontrollers featuring basic support electronics (crystal, power
regulator, etc.) on a small module.
 These modules are built with the assumption that users can build input
and output circuits to attach to it.
 They’re usually programmed in BASIC, or some variation of C, and
attached to the programming environment on a personal computer using a
serial or USB connection.
 Simulations are done on the designs after which the prototype is
constructed.
 To make all connections possible, it is intended that the ports be
hardwired on the board to make all communications possible from as
simple as LED up to complex communications like Wi-Fi, GSM etc.,
 It has three types of memory: Flash memory32KB non-volatile memory
for storing application, SRAM memory-2KB volatile memory for storing
variables used by applications while it's running, EEPROM memory-1KB
non-volatile. memory used to store data that must be available even after
the board is powered down and then powered up again.

3.Bidirectional synchronous interfaces


 A bidirectional synchronous interface for the reception of a first
flow of digital data.
 The interface is generally associated with digital circuits for
processing the data received and/or to be transmitted, which
typically operate on differently coded data, for example according
to the NRZ (Non-Return to Zero) coding.
 In reception, the interface should therefore receive, from a remote
analogous interface through a transmission/reception channel
consisting, for example, of a pair of coaxial cables, a signal
carrying CMI coded data, recognize them and convert them into
NRZ, and deliver them to the digital circuits which are to process
them.
 In transmission, the interface should receive from the digital
processing circuits NRZ-coded data, recognize them and convert
them into CMI, and pass them to the transmission/reception
channel.
 The LCD has four ports: an 8-bit bidirectional data port named DB,
and three input-only ports RW, RS, and E.
 RW selects the direction of DB for reading or writing.
 RS selects between the instruction register and the data register in
the LCD.
 E signals the start of a read or a write operation.
 The TP5087 has an 8-bit input only data port. Each of the four
switches has an output only port. The RAM has a 14-bit address
port, an 8-bit data port, a read enable port, and a write enable port.
 The UART has a data-in port and a data-out port.
4. OUTPUT DEVICES
 Data, or control line has a signal that is a (logical) one if the voltage is
above a certain threshold level and a (logical) zero if the voltage is below
that level.
 The voltages corresponding to a (logical) one and a (logical) zero are also
termed high signal and low signal, respectively.
 The clock signal is alternately low and high repetitively in a square wave.
 The clock signal between high-to-low transitions is called a clock cycle.
 In each clock cycle, the microcontroller can read a word from an input
port by putting the address of the word to be read on the address bus and
putting the read/write line to high throughout the clock cycle.
 At the clock cycle’s end, the device will put data on input lines on the
data bus, and the processor will copy the word on the data bus into some
internal memory register.
 The microcontroller can also write a word into an output port at a
particular address in one clock cycle by putting the address on the address
bus, putting the word to be written on the data bus, and making the signal
low on the read/write line throughout the clock cycle.
 At the clock cycle’s end, the microcontroller will write the word on the
data bus into the device.
 The written data will become available on the device’s output lines, until
changed by another output instruction.

Also refer the below link


https://web.iitd.ac.in/~jay/dsl732/studentpages/dds196021/
private_html/sachin/Template/template/assignments/
inputandoutput.html

5.LEDs
 Light Emitting Diodes or LEDs are the mostly commonly used
components in many applications. They are made of semiconducting
material.
 Commonly, used LEDs will have voltage drop of 1.7v and current of
10mA to glow at full intensity. This is applied through the output pin of
the micro controller.
 Light Emitting Diodes are the semi conductor light sources.
 Commonly used LEDs will have a cut-off voltage of 1.7V and current of
10mA.
 When an LED is applied with its required voltage and current it glows
with full intensity.
 The advantages of LEDs over normal incandescent lights include
robustness, faster switching, lower energy consumption, and small size.
LED requirements
There are some technical specifications that should be taken into account while
interfacing an LED.

 Peak forward current


 Continuous forward current
 Forward voltage
 Reverse voltage

Peak forward current

The forward current’s limit may damage the LED. For the red LED, peak
forward current is 100mA.

Continuous forward current

This is the optimum current required by the LED, we use this current in our
designing process.

Forward voltage

It is the voltage required by a diode to turn it on. This voltage range is 1.8 –
2.2V for red/orange/yellow LEDs, green/blue/white LEDs have a forward
voltage of around 3.4V.

Reverse voltage

This voltage indicates how much voltage you can give in reverse direction
before it gets blown.

https://openlabpro.com/guide/led-blinking-at89s51/#:~:text=The%20above
%20image%20is%20the,LED%20will%20be%20turned%20off.

6. PWM power level control

 Pulse-width modulation (PWM) is a powerful technique for


controlling analog circuits with a microcontroller's digital outputs.
 PWM is used in many applications, ranging from communications to
power control and conversion.
 For example, the PWM is commonly used to control the speed of electric
motors, the brightness of lights, in ultrasonic cleaning applications.
 PWM operates by adjusting the duty cycle of a waveform according to
the configured digital value. By doing so, it can produce an analog signal
from a digital output.

 A PWM is basically a digital unipolar square wave signal where the


duration of the ON time can be adjusted (or modulated) as desired.
 This way the power delivered to the load can be controlled from
a microcontroller.
 The ON and the OFF times are sometimes referred to as the MARK (or
M) and SPACE (or S) times of the signal, respectively.
 Here, it has three parameters: signal amplitude, signal frequency (or
period), and the signal duty cycle.
 In this concept, we will generate a PWM signal with a frequency of
40 kHz.
 This is the frequency commonly used in most ultrasonic applications,
such as distance measurement, ultrasonic cleaning, and so on.
 The duty cycle, denoted by D, is the ratio of the ON time to the period of
the signal, i.e., D = M/T.
 D can range from 0 to 1 and is sometimes expressed as a percentage, i.e.,
from 0% to 100%.
 The power supplied to the load is controlled by varying the duty cycle. 
 The below Figure shows signals with different duty cycles.

7. IR remote controls Ultrasonic distance measurement

 PIC16F887 microcontroller will be used to read ultrasonic sensor output


signals.
 Moreover, a 16×2 LCD is used to display the measured value of distance
on an LCD.  
 Distance measurement has important applications in automotive and
industrial applications.
 The distance measurement through sensors is useful in detecting
obstacles and measuring the fluid levels in automotive tanks and
containers.
 It is the distance measurement feature that allowed to imagine about self-
driving cars and robots.
 Without a technology that may have allowed to measure distance from an
object or obstacle, self-driving concept would have never been thought
of.
 The distance measurement application is also used in industries to check
fuel levels in aircrafts and commercial transport vehicles.
 The application is used in robotics to equip autonomous robots detect
obstacles and find an accessible path.
 This project is also a distance measurement application using ultrasonic
sensors.
 Infrared sensors work on the principle of reflected light waves.
 Infrared light reflected from objects or sent from an infrared remote or
beacon. Infrared sensors are also used to measure distance or proximity. 
 The reflected light is detected and then an estimate of distance is
calculated between sensor and object.
 The easy way to read the distance as centimeters is to use the
formula: Centimeters = ((Microseconds / 2) / 29).
 For example, if it takes 100µs (microseconds) for the ultrasonic sound to
bounce back, then the distance is ((100 / 2) / 29) centimeters or about 1.7
centimeters.

8. Odometry for motor control and navigation


 The technique of measuring the movement of the vehicle,
called odometry, requires an encoder that translates the turn of the wheels
into the corresponding travelled distance.
 Odometry is the use of data from motion sensors to estimate change in
position over time.
 It is used in robotics by some legged or wheeled robots to estimate their
position relative to a starting location.
 In wheeled robots, odometry is based on the movement of each wheel. 
 A rotation sensor (rotation optical encoder) is attached to each drive
wheel of the robot, and, knowing the wheel diameter, it is possible to
approximate linear displacement of each wheel.
 DC motor used as mobile robot actuators had been completed with two
rotary encoder sensors.
 Rotary encoder turning caused by motor turning produces a number of
pulses which can be used by microcontroller to determine the mobile
robot position at a current time.
 This position determination process is called as odometry method.
9.Radio Control Servos
 Servos are controlled by sending them a pulse of variable width.
 As long as the signal pulse exists on the signal line, the servo will
maintain the angular position of the shaft after it has rotated to that
position.
 As the signal pulse changes, the angular position of the shaft will
change.
 Servo motors or “servos”, as they are known, are electronic devices
and rotary or linear actuators that rotate and push parts of a machine
with precision.
 Servos are mainly used on angular or linear position and for specific
velocity, and acceleration.
 At its most elemental, a servo is a precise and powerful way of
converting rotational motion into linear motion.
 A servo (or servo motor, as it's sometimes known) consists of: The
Electronic Assembly, which consists of an AC or DC electric motor, a
controller board, and a potentiometer.
 The servo controller is the link between the servo motor and a high-
level control (PLC or programmable logic controller).
 It adapts the original signal and forwards it to the motor. The
controller therefore enables extremely precise control of position,
speed and torque.
 It is used for radio control and small-scale robotics.
 Radio control servos are connected through a standard three-wire
connection: two wires for a DC power supply and one for control,
carrying a pulse-width modulation (PWM) signal.
 Each servo has a separate connection and PWM signal from the radio
control receiver.
 This signal is easily generated by simple electronics, or
by microcontrollers such as the Arduino.
 This, together with their low-cost, has led to their wide adoption
for robotics and physical computing.

You might also like