Microcontroller Technology: Chapter 6 - Microcontroller Application and Peripheral Devices, Lecture notes of Microcontrollers

Microcontroller is a best subject to learn. Feel free to explore them.

Typology: Lecture notes

2019/2020

Uploaded on 06/24/2020

unknown user
unknown user 🇲🇾

1 / 32

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BEEZ 2404
Microcontroller Technology
Chapter 6: Microcontroller Application and Peripheral Devices
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20

Partial preview of the text

Download Microcontroller Technology: Chapter 6 - Microcontroller Application and Peripheral Devices and more Lecture notes Microcontrollers in PDF only on Docsity!

BEEZ 2404

Microcontroller Technology

Chapter 6: Microcontroller Application and Peripheral Devices

At the end of the class, you will be able:

To understand the peripheral devices operation.

to setup peripheral devices.

to identify important Specification/Features.

Relay and Opto-Coupler

ELECTROMECHANICAL RELAY

Electrically controllable switch ◦ Industrial controls, automobiles, and appliances Isolation of two separate sections of system with two different voltage source Consists of: coil, spring, and contact Types of relay:

◦ Normally Open (NO), Normally

◦ Closed (NC)

◦ Single Pole Single Throw (SPST)

◦ Single Pole Double Throw(SPDT) ◦ Double Pole Double Throw(DPDT)

Relay and Opto-Coupler

SOLID STATE RELAY

Compared to electromechanical relays Made out of semiconductor materials Faster switching response time Greater life expectancy Low input current and small packaging size

Relay and Opto-Coupler

INTERFACING RELAY WITH PIC

VDD and VSS of the PIC microcontroller is not shown in the circuit diagram. VDD should be connected to + 5 V and VSS to GND.

Relay and Opto-Coupler

OPTOCOUPLER

An Optocoupler, also known as an Opto-isolator or Photo-coupler, is an electronic components that interconnects two separate electrical circuits by means of a light sensitive optical interface. The basic design of an Optocoupler consist: ◦ LED that produces infra-red light and, ◦ a semiconductor photo-sensitive device that is used to detect the emitted infra-red beam. ◦ Both the LED and photo-sensitive device are enclosed in a light-tight body or package with metal legs for the electrical connections as shown. An optocoupler or opto-isolator consists of a light emitter, the LED and a light sensitive receiver which can be a single photo-diode, photo-transistor, photo-resistor, photo-SCR, or a photo-TRIAC and the basic operation of an optocoupler is very simple to understand.

Relay and Opto-Coupler

OPTOCOUPLER AS INPUT

The way it works is simple: ◦ when a signal arrives, the LED within the optocoupler is turned on, and it illuminates the base of a photo-transistor within the same case. ◦ When the transistor is activated, the voltage between collector and emitter falls to 0.7V or less and the microcontroller sees this as a logic zero on its RA4 pin.

Relay and Opto-Coupler

OPTOCOUPLER AS OUTPUT

An Optocoupler can be also used to separate the output signals. If optocoupler LED is connected to microcontroller pin, logical zero on pin will activate optocoupler LED, thus activating the transistor. This will consequently switch on LED in the part of device working on 12 V. Layout of this connection is shown below.

Liquid Crystal Display (LCD)

LCD is used to display information ◦ Calculator, mobile phone, security system. Two types of LCD: ◦ Graphic LCD can display all graphics. ◦ Alphanumeric LCD can only displays alphabets and numbers. ◦ Alphabets: A,B, C … a, b, c … ◦ Numeric: 0 , 1 , 2 , 3 ,…, 9 Categorized based on the numbers of characters can be displayed on the LCD. ◦ 16 x 2 : consists of 2 rows with maximum 16 characters for each row.

Liquid Crystal Display (LCD)

Pin layout and assignment

Liquid Crystal Display (LCD)

LCD Memory ◦ DDRAM ‐ Display Data RAM ◦ Storing characters that should be displayed ◦ The memory size is sufficient for 80 characters 2 line x 16 Characters

Liquid Crystal Display (LCD)

LCD Memory ◦ CGROM ‐ Character Generator ROM ◦ Default character map with all characters that can be displayed on the screen ◦ The address match the characters of ASCII

Seven Segment Display

A seven segment LED display is an special arrangement of 7 LED elements to form a rectangular shape using two vertical segments on each side with one horizontal segment on the top, middle, and bottom. The segments are marked with non-capital letters: a, b, c, d, e, f, g and dp, where dp is the decimal point. The 8 LEDs inside the display can be arranged with a common cathode or common anode configuration. ◦ In a common cathode display, the cathodes of all the segment LEDs are tied together and this common point must be connected to the ground. A required LED segment is then turned on by applying a logic 1 to its anode. ◦ In common anode displays, all the anodes are tied together and the common anode is connected to the supply voltage Vcc. Individual segments are turned on by applying logic 0 to their cathodes. When more than one seven segment display is used, a multiplexing technique is used to minimize the required number of microcontroller pins.

Seven Segment Display