Lecture – 7 Basic input and output

Slides:



Advertisements
Similar presentations
Introduction to Semiconductor Devices
Advertisements

Component Symbols & Information Prof. Dr. Moustafa M. Mohamed Vice Dean, Faculty of Allied Medical Science, Pharos University in Alexandria.
1 ECE 372 – Microcontroller Design Parallel IO Ports - Outputs Parallel IO Ports E.g. Port T, Port AD Used to interface with many devices Switches LEDs.
LECTURE 4 DIODE LED ZENER DIODE DIODE LOGIC
Input/Output (I/O) Ports and Interfacing
Input/Output Ports and Interfacing ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
In this presentation you will:
Design a Logic Probe Experiment 20. Design Specifications Design a logic probe as shown in the block diagram of Figure 1 of Experiment 20 with a signal.
1 Boe-Bot Parts BOE-BOT Lecture #1b DE - Digital Electronics.
OutLine Overview about Project Wii Robot Escaper Robot Problems and Solutions Demo.
Counter Circuits and VHDL State Machines
ECE 265 – LECTURE 13 Interface to switches and LEDs 7/3/ ECE265.
MEASUREMENT DEVICES OUTLINE Multimeters Analog Multimeters
DIGITAL CIRCUITS Dr. L M Head Sophomore Clinic Fall 2004.
BCD to 7-Segment Display
Digital Outputs 7-Segment Display
Embedded Programming and Robotics Lesson 1 Basic Electricity and Electronics Transistor Basics Lesson 1 -- Basic Electricity1.
Chapter 1 Quick review over Electronics and Electric Components Prepared By : Elec Solv.
ECE 447 Fall 2009 Lecture 6: TI MSP430 IO Interfacing.
ECE 447: Lecture 6 Input/Output Interfacing LEDs, Button Switches & Port Multiplexing.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Characteristics, Structures, and Applications.  Description of LED and Infrared LED  Schematic Symbol  Structure  Function and Characteristics  Application.
ENGR 355 Take Home Lecture 2 WRITING CODE Introductory Comments /* Disgruntled Avians Lab 6 ENGR355 by Tim Kyle Rev /1/2014 LM-3551 Tilt Sensor.
Microprocessor Block Diagram
Ch4 Electronic Components Circuit/Schematic Symbols.
Sensors and Electricity. What is a Sensor? A sensor is a device that: A sensor is a device that: 1) Measures a physical quantity 2) Converts this measurement.
Electrical Circuits Utah Underwater Robotics Instruction Slides.
Decode 1.1 Decoder, Encoders and Displays ©Paul Godin Updated Aug 2013.
Input/Output Ports and Interfacing
I/O devices Peripheral devices (also called I/O devices) are pieces of equipment that exchange data with a CPU Examples: switches, LED, CRT, printers,
COMP3221: Microprocessors and Embedded Systems Lecture 18: Computer Buses and Parallel Input/Output (II) Lecturer: Hui.
Engineering 1040: Mechanisms & Electric Circuits Winter 2015 Interfacing Light-Emitting Diodes (LEDs) & Push Buttons to Microcontrollers.
Electronic Components Circuit/Schematic Symbols. RESISTOR Resistors restrict the flow of electric current, for example a resistor is placed in series.
Physics 2225: Working With Electronic Equipment Purpose  Learn how to use basic electronic equipment: Digital multi meter Oscilloscope Function generator.
Introduction 2 Electrical Design
Magnitude Comparator Dr. Ahmed Telba.
Alpha/Numeric Keypad Functions using AVR Preliminary Design Review Luke R. Morgan ECE /17/2008.
Lab 2 page 1 ENT-DIGI-210 Lab 2 Notes ©Paul Godin Updated September 2007.
Chapter 3 Parallel Ports, Power Supply and the Clock Oscillator The aims of this chapter are to introduce: Why we need parallel input/output; How simple.
An introduction to PIC’s for KS3 and KS4. Mr Rooks Hetton School.
Automatic Hotel Check-in and out System PROJECT #31 Tingting Dang, Tianyuan Feng, Yuncong Hao.
Microcontroller based Traffic signal Umer Butt Amna Rashid Izza Rabbani Rozab Naveed Ramesha Akram.
Self Switching Power Supply. Introduction Self Switching Power Supply  Embedded system requires a regulated power supply.
BLDC Motor Speed Control with RPM Display. Introduction BLDC Motor Speed Control with RPM Display  The main objective of this.
ACCURATE ELECTRONIC STOPWATCH
LED AND KEYBOARD INTERFACING PREPARED BY :- PREPARED BY :- RAVAL AKASH ( ) RAVAL AKASH ( ) PATEL HARDIK ( ) PATEL HARDIK.
ISA CLICK CONTROL #38 – FALL 2014 ERIC BRUNNGRABER DRAKE ISABIRYE.
TECHNOLOGIES ESO 4 UNIT 1: ELECTRICITY AND ELECTRONICS ANALOGIC ELECTRONICS (PART 1)
Input & Output devices. Input Device :keyboard a keyboard is an input device, partially modeled after the typewriter keyboard, which uses an arrangement.
Deep Touch Pressure Abdomen Belt Group 32 Kevin Rathbun & Luke Fleming & Chang-O Pyo ECE 445 Senior Design April 28, 2015.
WATER LEVEL INDICATOR AND AUTOMATIC MOTOR SWITCHING SYSTEM
Application Case Study Christmas Lights Controller
ARDUINO BASED UNDERGROUND CABLE FAULT DETECTION
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
LED - Infrared 850nm   Description: This is a very simple, clear infrared LED. These devices operate between nm and work well for generic IR systems.
Introduction to Semiconductor Devices
ABSTRACT The controller continuously polls the temperature with certain regular time intervals and displays over the 7_segment display The temperature.
Semiconductor Diode.
For further information
SUBMITTED BY EDGEFX TEAM
Lecture 6: TI MSP430 IO Interfacing
DIGITAL CALCULATOR USING 8051
OBJECTIVE AND FEATURES:
9 LEVEL OVERHEAD WATER TANK NDICATOR
Principles & Applications Seven-Segment Displays
Interfacing different devices & considerations
How to avoid catching things on fire.
Internet-of-Things (IoT)
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /10/2018.
Electronic systems 7.
Presentation transcript:

Lecture – 7 Basic input and output

Outline Switch-based inputs Keypads LEDs 7-segment LED Displays LCD Displays Temperature sensor Flow sensor Infrared repeater

Switch-based inputs Most inputs to a PIC are switch based. The figure illustrates a few variations of mechanical switches often used with microcontrollers which include are SPST, SPDT (single-pole, double-throw), and DPDT (double-pole, double-throw) switches and pushbuttons. Each switch or pushbutton is connected so that either a logic zero or logic one is present at the output connection or connections. In all cases, a 10K resister is used to pull up the switch output to a logic one when the switch contacts are open. The value of the resister can range from a low of about 1K (lower values will cause excessive current flows) and a maximum of 47K (larger values will cause a problem with noise).

Various switches

Switch De-bouncing Switches present problems when being used to enter certain types of data because they mechanically bounce. A switch internally contains metal pole pieces that, when connected, physically bounce apart a few times. The figure shows what a bounce appears as electrically on a switch, and it also shows noise. Noise occurs on switch signal lines because it is usually impossible to shield a switch and its connections to a system from environmental noise. In most cases noise, as well as bounces, must be removed from a switch connection for reliable system operation.

Switch bouncing and noise Actual switch signal De-bounced switch signal

Keypads Keypads are often used in applications and are usually in the form of a key matrix. As with single switches keypads must be de-bounced. The figure illustrates telephone-style numeric keypad interfaced to Ports A and B. This is a 4 x 3 key matrix. Keypads are available in a variety of styles and sizes from 2 x 2 to almost any size. A keypad matrix is constructed with SPST pushbutton switches that connect a vertical column with a horizontal row.

Telephone-style 4 × 3 keypad matrix

LEDs The LED is often interfaced to an embedded system such as an indicator or segmented numeric display. The main advantage is high visibility and longevity. The LED normally functions for about 20 years. Other advantages are relatively low power requirements and the low level of heat generated compared to an incandescent lamp. Light emitting diodes are used in many applications, but they must be biased properly to be used. A current limiting resistor is used in series with an LED to select the correct current for the device.

LEDs The figure illustrates a single LED diode interfaced to a PIC18 port pin. One interface uses 10 mA of current and an inverter that provides enough current, which is slightly more than allowed by a port pin. The other uses 8.5 mA, which is allowed at a port pin. The series current limiting resistor is chosen using Ohm's law ( R =V/I ). Because the LED drops 1.65 V, the voltage across the resister is 3.35 V so the current of 10 mA determines that the resister size is 335 Ω (3.35 V/10mA). A 335 Ω resister is not available, so a 330 a standard value resister is chosen.

Driving a single LED using a +5.0 V power supply

7-segment LED Displays These devices are used when the display must be fairly large and have good visibility. Two types of 7-segment displays: common Cathode. common Anode. The common anode version has all its anodes of the LEDs connected to 5.0 V with a logic zero lighting a segment. The common cathode version connects all its cathodes to ground and a logic one is applied to the segments to light them. The LED display contains seven segments lettered from a to g. Some displays also contain a decimal point labelled dp.

7-segment displays types

Simple single 7-segment LED system The figure illustrates a single 7-segment display connected to a PIC18F1220. Also connected to the microcontroller is a single push button switch. The switch is connected to RA0 and the 7-segment display is connected to Port B. This display is driven with a 74LS244 buffer to provide the 10 mA per segment required by the display. Every time the button switch is pressed, the number on the 7-segment display increments one time.

Simple single 7-segment LED system

LCD Displays LCD displays are very common because they are low cost devices. The figure illustrates the connection of the Optrex DMC-20481, LCD display interfaced to a PIC18F1220. The DMC-20481 is a 4-line by 20-characters-per-line display that accepts ASCII code as input data and it also accepts commands that initialize it and control its operation. The data and control connections, attached to Port B, are used to input display data and read information from the display. The LCD operates with either an 8-bit or 4-bit data connection. When using a 4-bit data connection, data bits D4 through D7 on the LCD are used for data and connection; data bits D0 through D3 have no function and are not connected.

LCD interfaced to the microcontroller

Temperature sensor The figure illustrates the LM70 from National Semiconductor interfaced to the microcontroller. The device itself is the temperature sensor and is small enough to mount just about anywhere. The LM70 has a chip select input to enable it for a read or a write, a SI/O pin for serial data, and a SC input that functions as a serial clock signal. To read the temperature, place a logic zero on the chip select input and then pulse the SC input. After pulsing the SC input, read a bit of the temperature from the SI/O pin.

Temperature sensor

Flow sensor Flow sensors produce pulses as liquids flow through them. Suppose that fuel flow and consumption need to be measured in a system. This is accomplished by using a flow sensor such as the Gems FT-I 10 flow sensor. This device (model 173934) produces 8300 pulses per gallon of flow. The measurable flow rate is from 0.07 to 5.3 gallon per minute. This is a simple device to interface and requires only a single pull-up resistor and three wires.

Flow sensor

Infrared Remote Control Devices Infrared remote controls are extremely common and have many uses with embedded applications. The sensor and emitter are usually a simple infrared LED, or multiple LEDs for distances greater than a few meters. The signal is often transmitted at the relatively low rate of 36 KHz for many remote control devices, which makes the interface especially suited to a microcontroller. A useful device that illustrates the principle of infrared sensors is a remote control range extender circuit constructed with the microcontroller.

Infrared repeater This device requires both the infrared emitter and sensor, and illustrates some basic serial programming. The circuit uses the inexpensive PIC18F1220 and a few components. The power supply here is battery operated using four AA batteries (1.5V) and a MAX603 regulator to provide a steady 5 V to the circuit. This MAX603 integrated circuit uses an internal change pump and MOSFET to generate the 5 V output voltage from any input voltage between 2.7 V and 11.5 V.

Infrared repeater

Summary Switches bounce for approximately 10 ms and must be de-bounced for proper operation in many applications. De-bouncing is best handled with software. Keypads are often connected to a microcontroller for inputting various types of information. Keypads are most often constructed in the form of a matrix where pressing a key connects a row to a column. Light-emitting diodes that are interfaced to a microcontroller often require a driver circuit to produce enough current to light the LED. Numeric displays use LEDs in a 7-segment configuration that uses 7-segment code. Liquid crystal displays (LCD) are often connected to a microcontroller to display both numeric and alphabetic data. Various sizes of LCD display panels are available from I-line to line displays that have from 16 to 40 characters on a display line. Sensors are devices that convert motion or some other physical event into an electric signal that is processed by the microcontroller. These include rotational motion, pressure, temperature, liquid flow, and so forth.