Programming > Research Paper > LAB 2: Hardware Interfacing – Keypad CEG 3136 - Computer Architecture II Fall 2018 School of Engin (All)
LAB 2: Hardware Interfacing – Keypad CEG 3136 - Computer Architecture II Fall 2018 School of Engineering and Computer Science University of Ottawa LAB 2: Hardware Interfacing – Keypad CEG... 3136 - Computer Architecture II Fall 2018 School of Engineering and Computer Science University of Ottawa Experiment Date: 01/10/2018 Submission Date: 15/10/2018 OBJECTIVES ● To familiarize ourselves with the Motorola 9S12DG256. ● To implement a basic keypad unit. MATERIALS AND COMPONENTS ● Windows PC ● MiniIDE software ● Dragon-12 board and associated cables INTRODUCTION The purpose of this lab is to implement a connection between the keypad of a Dragon-12 board and an arming/disarming system. This employs concepts we familiarize ourselves with during the previous lab. DESIGN Part 1 To implement KeyPad.asm, we have to consider what it does. It must take in which key on the Dragon-12 keypad as input and manipulate its corresponding ASCII value. The subroutine pollReadKey checks for key presses on the Dragon-12 and converts to ASCII if so. The subroutine readKey takes the associated value of keys pressed on the Dragon-12, but it also accounts for faulty presses and brief taps with a delay beforehand. The readKeyCode subroutine involves three nested conditional statements for the four rows on the keypad. The logic behind this employs the understanding that each row on the keypad should detect key presses for a moment, and if one is pressed, indicate which key. Finally, the subroutine returns the changed PORTA value. The simplest yet most time-consuming subroutine is translate, which takes the value from the previous subroutine and translates it to the corresponding and necessary ASCII code. This is achieved with many conditional statements. [Show More]
Last updated: 1 year ago
Preview 1 out of 5 pages
Connected school, study & course
About the document
Uploaded On
Oct 14, 2020
Number of pages
5
Written in
This document has been written for:
Uploaded
Oct 14, 2020
Downloads
0
Views
117
In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Browsegrades · High quality services·