ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 12.

Slides:



Advertisements
Similar presentations
I/O Organization popo.
Advertisements

Lab 9: Matrix Keypad : ”No Key Press” Analysis Slide #2 Slide #3 ”Press and Hold Key 5” Analysis.
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.
Programmable Interval Timer
Programmable Keyboard/ Display Interface: 8279
kashanu.ac.ir Microprocessors 6-1 I/O Devices Switches, LED, LCD Lec note 6.
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.
I/O Unit.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 3: Input/output and co-processors dr.ir. A.C. Verschueren.
Storey: Electrical & Electronic Systems © Pearson Education Limited 2004 OHT 4.1 Actuators  Introduction  Heat Actuators  Light Actuators  Force, Displacement.
Embedded Systems Design 1 Lecture Set B Interfacing the MCS-51 to: –7 and 16 segment displays –a Multiplexed 7-Segment Display –a Keypad –an LCD.
ASPPRATECH.
ID 421C:Designing with Segmented LCD Displays Travis Weisberger Embedded Systems Engineer Version: 1.3 BNS Solutions 13 October 2010.
Lecture – 7 Basic input and output
ECE 447 Fall 2009 Lecture 6: TI MSP430 IO Interfacing.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 12.
2 Lines Electronics I 2 C Analyzer Ching-Yen Beh Robert S. Stookey Advisor: Dr. J. W. Bruce.
Input/Output Ports and Interfacing
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 7.
MICROPROCESSOR INPUT/OUTPUT
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,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
COMP3221: Microprocessors and Embedded Systems Lecture 18: Computer Buses and Parallel Input/Output (II) Lecturer: Hui.
Khaled A. Al-Utaibi  Interrupt-Driven I/O  Hardware Interrupts  Responding to Hardware Interrupts  INTR and NMI  Computing the.
8086/8088 Hardware Specifications Power supply:  +5V with tolerance of ±10%;  360mA. Input characteristics:  Logic 0 – 0.8V maximum, ±10μA maximum;
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
10/24/2015 Amrita Vishwa Vidyapeetham 1 Key Board & LED Interfacing.
© 2000 Morgan Kaufman Overheads for Computers as Components I/O devices  I/O devices:  serial links  timers and counters  keyboards  displays  analog.
8279 KEYBOARD AND DISPLAY INTERFACING
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
1 ECE 372 – Microcontroller Design Parallel IO Ports - Inputs.
PPI-8255.
ELECTRIC LINE MAN SAFETY WITH PASSWORD BASED CIRCUIT BREAKER Under the Guidance of Submitted by Project Title.
8279 KEYBOARD AND DISPLAY INTERFACING
Magnitude Comparator Dr. Ahmed Telba.
Interfacing to External Devices  Explore Digital Interfaces techniques  Introduce some complex optical devices and how to interface them  Describe methods.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Alpha/Numeric Keypad Functions using AVR Preliminary Design Review Luke R. Morgan ECE /17/2008.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
ECE 353 Introduction to Microprocessor Systems Michael J. Schulte Week 9.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Mark Neil - Microprocessor Course 1 Decoding and Using a 4x4 Keyboard.
I/O Devices Switches, LED, LCD
ECE 447: Lecture 12 Keypads ECE 447: Lecture 10. ECE 447: Matrix Keypad.
KEYBOARD/DISPLAY CONTROLLER - INTEL Features of 8279 The important features of 8279 are, Simultaneous keyboard and display operations. Scanned keyboard.
Programmable Keyboard/Display Interface contains the following features: Simultaneous and independent scanning of a keyboard and refresh.
Modular Swimming Pace Aid ECE 445 Group Members: Igor Fedorov, Ryan Cook, Michael Chan Professor Carney (TA Ryan May)
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
Microprocessor Systems Design I
ULTRASONIC DISTANCE METER USING 8051
LCD and Keyboard Interfacing
DIGITAL CALCULATOR USING 8051
Principles & Applications Seven-Segment Displays
Keyboard/Display Controller INTEL 8279
EET 2261 Unit 11 Controlling LCD and Keypad
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /10/2018.
Interfacing Memory Interfacing.
LCD and Keyboard Interfacing
ECE 434 Advanced Digital System L12
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
Keyboard/Display Controller (8279)
8279 – Programmable Keyboard/Display Interface
LCD and Keyboard Interfacing
Presentation transcript:

ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 12

Topics Digital Inputs Mechanical switches Keypads and keyboards Rotary encoders Displays LED displays LCD displays

Mechanical Switches Types of switches Poles Throws Contact action Converting switch position to a logic level Mechanical contact bounce Debouncing in Hardware RS latch Integrator/Schmitt-trigger Dedicated ICs (MAX6816/7/8)MAX6816/7/8

Mechanical Switches Debouncing in Software How to do? Exercise 1.Develop an algorithm for debouncing of a single switch. (Assume 0 when pressed.) 2.Draw a flowchart to implement your algorithm in an ISR that will be invoked by a periodic timer interrupt. Implementing repeat and acceleration.

Keypads and Keyboards Switch connections Linear Matrix Matrix scanning a lgorithm (keypad example)keypad example Drive columns (rows) low one at a time. Read the rows (columns), any low rows (columns) correspond to pressed switches in the column (row). Matrix Circuit Requirements Pull-up resistors to ensure that open rows (columns) are high. Use open-drain/open-collector driver on each column (row) to avoid contention issues with multiple presses.

Switch Matrix Issues Switch Ambiguities If more than two switches are pressed, may “see” more switches active than there really are. (phantom switches) Can be solved in hardware by placing a series diode at each switch. (keypad example)keypad example Handling Roll-Over Another switch is pressed before the current key is released This is very common when people type on keyboards – especially good touch typists A keyboard provides N-key roll-over if N switches can be recognized simultaneously

Rotary Encoders Convert angular position to digital value Encoding schemes Single channel incremental encoders Quadrature Encoders Absolute Encoders Indexed Encoders Interfacing Software  Using interrupts or periodic polling Using interrupts Hardware  Design logic or use dedicated devices

LED Basics LEDs are long-life, high-efficiency devices Temperature/vibration tolerant Electrical characteristics Typical small LEDs have I F of 5-20mA I F in high powered LEDs can be much morehigh powered LEDs Driver requirements for small LEDs Current limiting must be provided when driving LEDs from a voltage source Many logic gates cannot directly drive LEDs  Simple transistor switches with current limiting resistors are the simplest solution

Multiplexed LED Displays Display types Driving multi-segment displays Multiplexed displays Driver circuits Refresh rate Duty cycle Intensity control Display driver ICs

LCD Display Characteristics Numeric, text and/or graphic displays Extremely low power Passive Temperature sensitive Complex drivers required to create segment waveforms Require no net DC offset on segments – on single polarity systems this adds to driver complexity

LCD Technology Natural state Molecules are arranged in a loosely ordered fashion with their long axes parallel. Aligned state When coming into contact with a finely grooved surface (alignment layer), molecules line up in parallel along the grooves.

LCD Technology When liquid crystals are sandwiched between upper and lower plates, they line up with grooves pointing in directions 'a' and 'b,' respectively. The molecules along the upper plate point in direction 'a' and those along the lower plate in direction 'b,' thus forcing the liquid crystals into a twisted structural arrangement. (figure shows a 90-degree twist) (TN type liquid crystal)

LCD Technology Light passes through liquid crystals, following the direction in which the molecules are arranged. When the molecule arrangement is twisted 90 degrees as shown in the figure, the light also twists 90 degrees as it passes through the liquid crystals.

LCD Technology The molecules in liquid crystals are easily rearranged by applying voltage or another external force. When voltage is applied, molecules rearrange themselves vertically (along the electric field) and light passes straight through.

LCD Technology Light passes when two polarizing filters are arranged with their axes aligned (left). Light is blocked when two polarizing filters are arranged with their axes perpendicular (right).

LCD Technology A combination of polarizing filters and twisted liquid crystal is used to create a liquid crystal display.

LCD Character Modules Based on Hitachi LCD-II controller protocol 1 to 4 lines, 8-20 characters per line 4 or 8 bit parallel interface Motorola style control signals 256 character font 8 user defined characters (CGRAM) Controllable cursor 2 read/write registers  Instruction/status  data

LCD Character Modules Standard Hardware Interface Contrast adjustment  Temperature considerations Control bus connections Register addressing Bus Timing Requirements Often slower than processor – may require wait states Sequential operations often require delay Can drive LCD module bus from I/O pins and manipulate to get proper waveforms (bit-banging) Backlights LED CCFL/EL

LCD Commands Commands Display Clear Cursor Home Entry Mode Set Display On/Off Control Cursor/Display Shift Function Set Set CGRAM Address Set DDRAM Address Using BUSY Flag

Designing a Software Interface What procedures would you write in order to create a higher-level software interface to the LCD display? Build a hierarchy using low-level procedures as building blocks – LCD Initialization Send Command (pass command) Send Data (pass data) Check if Busy (return state) Wait until Ready Write Character at Location (pass char, location) Write Character String (pass address) Write Character String at Location (pass addr, location)

Wrapping Up Homework #6 due Wednesday, April 25 th Quiz #3 on Thursday, May 3 rd at 7:15pm in 2255EH Coverage is over Modules 5 and 6. Same rules as other quizzes, except calculators will be permitted for numeric calculations.

Matrix-Connected Switches Each switch connected between a row line and a column line. More complicated circuitry required to poll switches. Why connect in a matrix? Think about keyboard with 100+ keys... Back

74C Key Encoder Back

Maxim MAX6816/7/8 Back

Quadrature Rotary Encoders There are normally many electrical cycles for each mechanical revolution.

Back Rotary encoder A/B outputs typically go through many electrical cycles for a single revolution of the encoder shaft. The absolute shaft position is unknown. An indexed rotary encoder is essentially a quadrature encoder that has an additional output that provides a single pulse during each mechanical revolution. This reference signal provides a way to determine the absolute shaft position. Indexed Rotary Encoders

Absolute Rotary Encoders Back Position (+/- 22.5°) Output DecimalBinaryChanged BitsGray Code 0°0° ° ° ° ° ° ° ° °00003 The n-bit output is directly proportional to the angular position.

Rotary Encoder with Interrupts Back

Typical LED Characteristics Back

LED Displays Back

MAX7219 Multiplexed Display Driver Back

LED current limiting resistors Multiplexed Display

HW Switch Debouncing RS Latch Back

HW Switch Debouncing Back RC Integrator with Schmitt-trigger gate Debounces both press and release

Back Keypad Example

Back Phantom Switch