EE 134 / EE 101 Spring, 2002 Lecture 19 Exam 2 Solutions.

Slides:



Advertisements
Similar presentations
Chapter 18 The 8051 Microcontroller
Advertisements

Chapter 13 Shift Registers
PROGRAMMABLE PERIPHERAL INTERFACE -8255
MC68HC11 System Overview. System block diagram (A8 version)
Figure 8–1 A 2-bit asynchronous binary counter
TK2633 Introduction to Parallel Data Interfacing DR MASRI AYOB.
Lecture 07: 8255 PPI Chip. The 80x86 IBM PC and Compatible Computers Chapter PPI Chip PPI: Programmable Parallel Interface (so it is an I/O.
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.
Engineering 4862 Microprocessors Lecture 23 Cheng Li EN-4012
82C55 82C55 Programmable Peripheral Interface Interfacing Part III.
Figure 7–1 Two versions of SET-RESET (S-R) latches
Parallel I/O. Introduction oThis section focuses on performing parallel input and output operations on the 68HC11 o3 operation types oSimple, blind data.
1 I/O and Interrupts Today: First Hour: I/O Concepts –Section of Huang’s Textbook –In-class Activity #1 Second Hour: Interrupt Code Example –In-class.
ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Reinforced Concrete: A Fundamental Approach, Sixth Edition By Edward G. Nawy Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey.
Chapter 11: Basic I/O Interface. Copyright ©2009 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. The Intel Microprocessors:
Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Slide 1 The Digital.
ECE200 – Computer Organization Chapter 8 – Interfacing Processors and Peripherals.
P Address bus Data bus Read-Only Memory (ROM) Read-Write Memory (RAM)
Figure 6–1 Logic symbol for a half-adder. Open file F06-01 to verify operation. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education,
Digital Fundamentals Floyd Chapter 9 Tenth Edition
Figure 1–1 Graph of an analog quantity (temperature versus time). Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper.
Figure 9–1 The flip-flop as a storage element.
H. Huang Transparency No.7-1 The 68HC11 Microcontroller Chapter 7: Parallel I/O Ports The 68HC11 Microcontroller Han-Way Huang Minnesota State University,
Khaled A. Al-Utaibi  Intel Peripheral Controller Chips  Basic Description of the 8255  Pin Configuration of the 8255  Block Diagram.
Copyright ©2011, ©2008, ©2005 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Electric Circuits, Ninth Edition James.
Dec Hex Bin 13 D ORG ; THIRTEEN 8253/54 Timer.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
Input/Output Ports and Interfacing
Copyright ©2011 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Chapter Cost-Benefit Analysis Concepts and Practice.
Basic I/O Interface A Course in Microprocessor
Computer Architecture Lecture 9 by Engineer A. Lecturer Aymen Hasan AlAwady 10/2/2014 University of Kufa - Information Technology Research and Development.
FIGURE 9-1 General Parallel I/O Example Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc.
Applications of PPI A/D - Temperature Sensor. Analog to Digital.
FIGURE 8-1 Generic I/O Subsystems Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper.
Computer Organization and ASSEMBLY LANGUAGE
FIGURE 11-1 Bit assignments for the Timer Control, Mask, and Flag Register Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright.
Figure 4–1 Application of commutative law of addition. Thomas L. Floyd Digital Fundamentals, 9e Copyright ©2006 by Pearson Education, Inc. Upper Saddle.
Figure 1--1 The Four Learning Theories Gail E. Tompkins Literacy for the 21st Century, 3e Copyright ©2003 by Pearson Education, Inc. Upper Saddle River,
Copyright ©2011 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Introduction to Engineering Experimentation, Third.
PPI-8255.
FIGURE 7.1 Introducing the reduce and return approach. Robert L. Boylestad Introductory Circuit Analysis, 10ed. Copyright ©2003 by Pearson Education, Inc.
Figure Materials in Basal Reading Programs Gail E. Tompkins Literacy for the 21st Century, 3e Copyright ©2003 by Pearson Education, Inc. Upper Saddle.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Basic LED Interface.
Parallel I/O. Introduction This section focuses on performing parallel input and output operations on the 68HC11 3 operation types – Simple, blind data.
EE365 - Microprocessors period 26 10/23/00 D. R. Schertz # Parallel Ports.
Figure 3--1 Options for organizing information Pfeiffer Technical Writing, 5ed. Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New Jersey.
Copyright ©2011 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Chapter Cost-Benefit Analysis Concepts and Practice.
Figure A--1 Thomas L. Floyd Digital Fundamentals, 8e Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.
Copyright ©2011 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. Chapter Cost-Benefit Analysis Concepts and Practice.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Logic and Computer Design Fundamentals, Fifth Edition Mano | Kime | Martin Copyright ©2016, 2008, 2004 by Pearson Education, Inc. All rights reserved.
1 Bringing it all together: Exploring the EVB Today: First Hour: Bringing it all together by exploring the EVB –Section of Huang’s Textbook.
FIGURE 6.1 Parallel elements. Robert L. Boylestad Introductory Circuit Analysis, 10ed. Copyright ©2003 by Pearson Education, Inc. Upper Saddle River, New.
8255:Programmable Peripheral Interface
1 Bringing it all together: Exploring the EVB Today: First Hour: Bringing it all together by exploring the EVB –Section of Huang’s Textbook.
Tutorial 9 Module 8 – 8.1,8.2,8.3. Question 1 Distinguish between vectored and non-vectored interrupts with an example Build a hardware circuit that can.
SCI Communication Proudly Presented By: Adam Cardi & Aaron Enes.
Copyright ©2009 by Pearson Higher Education, Inc. Upper Saddle River, New Jersey All rights reserved. Digital Fundamentals, Tenth Edition Thomas.
8255 Programmable Peripheral Interface
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Input/Output Ports and Interfacing
General Purpose I/O.
PROGRAMMABLE PERIPHERAL INTERFACE -8255
8255.
Programmable Peripheral Interface
82C55 Programmable Peripheral Interface
Programmable Peripheral Interface
Presentation transcript:

EE 134 / EE 101 Spring, 2002 Lecture 19 Exam 2 Solutions

Problem 1. Figure 9.16 in text: Input Handshake Timing Diagrams Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. We are using Interlocked mode. STRB active low. We are not using pulsed mode here.

Another view of Problem 1: FIGURE 9-19 Centronics Parallel Interface Timing Diagram Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. 68HC11 PORTC STRA STRB PORTCL is read Data is latched into PORTCL The Centronics standard is a good example of input handshaking, where the MCU is inside the printer. In this problem we do not have an ACK signal.

* EE101/EE134 Exam 2 (The following is just a sample Main program) Main LDX#REGBAS;set IX for indexed addressing of ports BSRInit_PortC New_Data BSRInput_Data BSRDisplay_Bit BRANew_Data ********************************************************* *Subroutine: Initialize Port C *The MCU receives parallel data from the peripheral *using interlocked handshaking. * HNDS = 1, all other bits = 0 *Calling register: IX = REGBAS *Return regiester: none, but ACCA changed Init_PortC BCLRDDRC,X $FF ; all inputs (It was OK to not include this) LDAA#$10 STAAPIOC,X RTS ********************************************************* *Subroutine: Wait for data in PORTCL *Calling register: IX = REGBAS *Return register: ACCA contains input data Input_Data BRCLRPIOC,X $80 Input_Data; wait for STAF=1 LDAAPORTCL,X; ACCA = data RTS

Problem 3: FIGURE 9-3 Seven-Segment LED Display Connections Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. This is the type of LED display specified in the problem. A low (zero) bit turns that segment on.

FIGURE 9-4 Seven-Segment Code Examples Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

********************************************************* *Subroutine: Display 0 if Z set, 1 if Z clear *Uses common-anode 7-segment LED display (0=on, 1=off) *Assume PB0 -> a, PB1 -> b,..., PB6 -> g, PB7 -> N.C. *Calling registers: IX = REGBAS, Z bit in CCR *Return register: none, but ACCA changed Display_Bit BNEOne; be sure Z isn't changed before test Zero LDAA#$40; or $C0 STAAPORTB,X RTS One LDAA#$79; or $F9 STAAPORTB,X RTS

Problem 4: FIGURE x 4 Matrix Keyboard (Telephone Format) Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved.

Problem 4: FIGURE 9-10 Parallel I/O with Keyboard. Also connect PC7 high using a pull-up resistor. Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright ©2002 by Pearson Education, Inc. Upper Saddle River, New Jersey All rights reserved. With this layout we need to setup the Port C Data Direction Register, DDRC, with $0F.

Problem 5: a.Printers b.Instruments c.One microsecond (two clock cycles) d.IRQ e.0 f.$D6 g.$1007 h.0 (or no change) i.Read, receive, or load j.Data bus