EKT 222 MICROPRESSOR SYSTEM. LAB 4 Extra : INTERFACING WITH OTHER I/O DEVICES

Similar documents
8 X 8 KEYBOARD INTERFACE (WITHOUT INTERRUPT SIGNAL)

Lab #10: Building Output Ports with the 6811

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

Experiment 3: Basic Embedded System Analysis and Design

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

EXPERIMENT 2: Elementary Input Output Programming

Experiment 7 Fall 2012

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

EECS145M 2000 Midterm #1 Page 1 Derenzo

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Fixed-Point Calculator

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

ECE 372 Microcontroller Design

Lecture 14: Computer Peripherals

Part No. ENC-LAB01 Users Manual Introduction EncoderLAB

APPLICATION NOTE 4312 Getting Started with DeepCover Secure Microcontroller (MAXQ1850) EV KIT and the CrossWorks Compiler for the MAXQ30

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Radio Clock with DCF77

Lab # 9 VGA Controller

Digital Blocks Semiconductor IP

KRAMER ELECTRONICS LTD. USER MANUAL

Experiment 8 Fall 2012

Final Project [Tic-Tac-Toe]

Laboratory 1 - Introduction to Digital Electronics and Lab Equipment (Logic Analyzers, Digital Oscilloscope, and FPGA-based Labkit)

Laboratory 8. Digital Circuits - Counter and LED Display

EE 367 Lab Part 1: Sequential Logic

HDL & High Level Synthesize (EEET 2035) Laboratory II Sequential Circuits with VHDL: DFF, Counter, TFF and Timer

Table of Contents Introduction

Kramer Electronics, Ltd. USER MANUAL. Models: VS-626, 6x6 Video / Audio Matrix Switcher VS-828, 8x8 Video / Audio Matrix Switcher

FPGA Laboratory Assignment 4. Due Date: 06/11/2012

ENGR 1000, Introduction to Engineering Design

CSC258: Computer Organization. Combinational Logic

ECE 270 Lab Verification / Evaluation Form. Experiment 9

ECT 224: Digital Computer Fundamentals Digital Circuit Simulation & Timing Analysis

Keyboard Controlled Scoreboard

ECE 3610 MICROPROCESSING SYSTEMS: A SPEECH RECORDER AND PLAYER. Using the Polling I/O Method

Design and Implementation of an AHB VGA Peripheral

Programmable Logic Design Techniques II

Assignment 3: 68HC11 Beep Lab

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0.

The Calculative Calculator

Lecture 2: Digi Logic & Bus

Laboratory 4. Figure 1: Serdes Transceiver

Final Exam review: chapter 4 and 5. Supplement 3 and 4

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

Quick Guide Book of Sending and receiving card

Experiment: FPGA Design with Verilog (Part 4)

Laboratory Exercise 7

Configuring the Élan SC300 Device s Internal CGA Controller for a Specific LCD Panel

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

Risk Risk Title Severity (1-10) Probability (0-100%) I FPGA Area II Timing III Input Distortion IV Synchronization 9 60

Scans and encodes up to a 64-key keyboard. DB 1 DB 2 DB 3 DB 4 DB 5 DB 6 DB 7 V SS. display information.

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

Sub-LVDS-to-Parallel Sensor Bridge

CMOS VLSI Design. Lab 3: Datapath and Zipper Assembly

VIDEO 2D SCALER. User Guide. 10/2014 Capital Microelectronics, Inc. China

IMS B007 A transputer based graphics board

Magnetic Rower. Manual Jetstream JMR-5000

Side Street. Traffic Sensor. Main Street. Walk Button. Traffic Lights

Laboratory Exercise 4

LED BASED SNAKE GAME

Anritsu Setup Procedure for GSP-1720 Measurements

Laboratory Exercise 7

Ryerson University Department of Electrical and Computer Engineering COE/BME 328 Digital Systems

o The 9S12 has a 16-bit free-running counter to determine the time and event happens, and to make an event happen at a particular time

Programmable Logic Design I

ID 421C: Designing with Segmented LCD Displays

Lecture 10: Programmable Logic

W.E.F. SESSION Course: Bachelor of Science (B.Sc.) Subject: Electronics Title of Paper Max. Marks Exam Duration Semester-V

Lab 4: Hex Calculator

Digital. Digital. Revision: v0.19 Date: : / 76

o The 9S12 has a 16-bit free-running counter to determine the time and event happens, and to make an event happen at a particular time

Introduction to CMOS VLSI Design (E158) Lab 3: Datapath and Zipper Assembly

EN2911X: Reconfigurable Computing Topic 01: Programmable Logic. Prof. Sherief Reda School of Engineering, Brown University Fall 2014

Combo Board.

Task 4_B. Decoder for DCF-77 Radio Clock Receiver

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

CARLETON UNIVERSITY. Facts without theory is trivia. Theory without facts is bull 2607-LRB

KW11-L line time clock manual

Design of VGA Controller using VHDL for LCD Display using FPGA

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

Lab #10 Hexadecimal-to-Seven-Segment Decoder, 4-bit Adder-Subtractor and Shift Register. Fall 2017

A First Laboratory Course on Digital Signal Processing

Setting Up the Warp System File: Warp Theater Set-up.doc 25 MAY 04

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

Laboratory 9 Digital Circuits: Flip Flops, One-Shot, Shift Register, Ripple Counter

DEPARTMENT OF MECHANICAL ENGG ME2255-ELECTRONICS AND MICROPROCESSOR QUESTION BANK. Prepared by L.JOHN PETER AP/ECE

LABORATORY 14: ANALOG TO DIGITAL CONVERSION USING ADC0809

AUTOMATIC LICENSE PLATE RECOGNITION(ALPR) ON EMBEDDED SYSTEM

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

LogiCORE IP Video Timing Controller v3.0

Lab 2: Hardware/Software Co-design with the Wimp51

Vtronix Incorporated. Simon Fraser University Burnaby, BC V5A 1S6 April 19, 1999

Chapter 3: Sequential Logic Systems

Manual of Operation for WaveNode Model WN-2m. Revision 1.0

MAIN PCA TEST PROCEDURE DOCUMENT NUMBER:

Do the following: a. (12 points) Draw a block diagram of your circuit design, showing and labeling all essential components and connections.

Marks and Grades Project

Transcription:

EKT 222 MICROPRESSOR SYSTEM LAB 4 Extra : INTERFACING WITH OTHER I/O DEVICES

LAB 4 Extra: Interfacing with Other IO devices Objectives: 1) Ability to create advance program instructions 2) Ability to use branching instructions 3) Ability to execute and demonstrate the program instructions 4) Ability to analyze the 8085 register and memory map conditions Equipments : 1. Computer station with Windows OS and MY1 8085 simulation program 2. 8085 Instruction Sets (Assembly Code) 3. 8085 Instruction Sets (Machine Code) Introduction The 8085 simulator program MY1 Sim85, has several built-in input output graphical user interfaces (GUIs) developed for the users practice. Although not exactly accurate as in the actual hardware input and output devices, but these graphical interfaces do offer the user some added value demonstration materials in understanding their program further. One can especially observe their simulation program and analyze on any assembly code improvements. Table 1 below lists out the available IO GUIs and its operating procedures: No GUI Device Panel Description 1 8 LEDs (output) & 8 LEDs aligned in one row in one panel. There are two panels available. The horizontal panel and the vertical panel. Each LED requires logic HIGH to illuminate. Direct usage bit to LED representation. 2 8 switches (input) 8 push-pull type switches aligned in one row. When in pushed-up condition (red color), it gives logic LOW and when pulled-down (blue color), it gives logic HIGH. Direct bit to switch representation. 3 8 pushbuttons (input) 8 pushbuttons in one panel. When depressed (red color) gives logic LOW and when pressed (blue color) gives logic HIGH. Direct bit to button representation. 1

4 7-segment LED (output) 7-segment LED active high panel. Requires 8-bit data to send and operate the desired segment. Direct pin to LED representation. 5 4x4 Keypad (input) 16 button panel using the 4x4 matrix. Using 5-bit signals, 2 bit column, 2 bit row and one bit acknowledge sent into the processor. The acknowledge signal, DA will assert (logic HIGH) upon valid keypress together with the 4x4 bit matrix data. The data will stay present after the key is released until another key is pressed. DA - Data Acknowledge D3 & D2-2-bit ROW data (00 ~ 11) D1 & D0-2-bit COLUMN data (00 ~ 11) Table 1 : My1 Sim85 IO Panels In this extra lab activity, students will be demonstrated on 1. How to display data onto the 7-segment LED 2. How to use the 4x4 keypad 2

LABORATORY TASK Part A : INTERFACING THE 7-SEGMENT LED Given below is a sample program on how to display a BCD counter on a 7-segment LED. Take note of the string of data sent to PORT A. ORG 0000H LXI SP,3FF0H ; stack memory setting PORTA: EQU 80H ; set 80H with a name PORTB: EQU 81H ; PORTC: EQU 82H ; CTRL: EQU 83H ; MVI A,80H ; set the port directions OUT CTRL ; send to control register AGAIN: MVI B,10 ; create an internal counter at B LXI H,TABLE ; set HL with memory pointer COUNT: MOV A,M ; get data from memory pointer OUT PORTA ; send out to 7-segment MVI C,20 ; create a delay value at C DELAY: DCR C ; decrease C JNZ DELAY ; jump to delay if C 0 INX H ; if C = 0 then increase HL DCR B ; decrease B counter JNZ COUNT ; if B 0, continue count up JMP AGAIN ; if B = 0 reset B counter HLT TABLE: 00111111B, 00000110B, 01011011B, 01001111B, 01100110B 01101101B, 01111101B, 00000111B, 01111111B, 01101111B As you can see, the Table s 8-bit values were prepared to illuminate the necessary LED segments. 3

Part B : INTERFACING THE KEYPAD Given below is a sample program to display the BCD value of a keypad on the 7- segment LED. Values above 9 will cause the 7-segment LED to display E rror. Take note of the string of data sent to PORT A. ORG 0000H LXI SP,4000H PORTA: EQU 80H PORTB: EQU 81H PORTC: EQU 82H CTRL: EQU 83H MVI A,10000010B ; Port A (output), Port B (input) OUT CTRL MVI A,00H ; clear 7-segment OUT PORTA CHECK1: IN PORTB ; check for valid key press ANI 10H JZ CHECK1 CHECK2: IN PORTB ; check for valid key release ANI 10H JNZ CHECK2 LXI H,DATA ; set HL with memory pointer MVI B,0 ; set B register with 00H IN PORTB ; get keypad data MOV C,A ; copy to C register DAD B ; add HL with BC contents & store in HL MOV A,M ; get data from new HL memory pointer OUT PORTA ; display to 7-segment JMP CHECK1 ; jump to check1 HLT DATA: 00000110B, 01011011B, 01001111B, 01111001B 01100110B, 01101101B, 01111101B, 01111001B 00000111B, 01111111B, 01101111B, 01111001B 01111001B, 00111111B, 01111001B, 01111001B As you can see, the program will check if a key is pressed (DA=1) before that key is released (DA=0). This process will justify a valid keystroke. 4

EXERCISE 1. Create a program that will display the BCD value of a 4-bit switch on a 7- segment LED. Use the BCD data string table from the Laboratory Task as reference. 2. The BCD counter in Laboratory Task Part A counts on every clock pulse supplied by the simulator software. Recreate the program so that the counter will count on every clock pulse pressed by a PUSH BUTTON. 3. Create a program that will blink an LED according to the count of the keypad value. For example if the key 5 is pressed, then the LED will blink 5 times AFTER a PUSH BUTTON is pressed. 4. Create an up-down BCD counter with the following sequence : 0 -> 1 -> 2 -> -> 8 -> 9 -> 8 -> 7 -> -> 2 -> 1 -> 0 5. Create a program that will store 4 digits and then display the digits in sequence on a 7-segment LED. 6. Using 2 push-pull switches, create a program that will fulfill the following operation : a. 00 the 7-segment displays 0 only b. 01 the 7-segment will do a BCD continuous up count c. 10 the 7-segment will do a BCD continuous down count d. 11 the 7-segment will pause counting 5