Computer Architecture > Lab Experiment > CEG 3136 Lab 2: Hardware Interfacing - Keypad: PURPOSE: To introduce the interfacing of the Motorola (All)

CEG 3136 Lab 2: Hardware Interfacing - Keypad: PURPOSE: To introduce the interfacing of the Motorola 9S12DG256 through an implementation of a keypad unit.

Document Content and Description Below

CEG 3136 Lab 2: Hardware Interfacing - Keypad Fall 2019 Students: Purpose | 3 Equipment | 3 Part One: | 3 Problem | 3 Input/Outputs of Problem | 3 Algorithm | 3 Implementation | 8 Te... sting | 8 Part two: | 8 Problem | 8 Input/Outputs of Problem | 8 Algorithm | 9 Implementation | 9 Testing and Validation | 10 Conclusion: | 10 Purpose The purpose of this lab was to introduce the interfacing of the Motorola 9S12DG256 through an implementation of a keypad unit. Equipment -Windows PC -Dragon12 board Part One: Problem The task was to implement KeyPad.asm which would be used to communicate with the touchpad on the Dragon12 board. This code is used to take the inputs done on the touchpad by the user and associate them with a numerical value in ASCII code corresponding to the character pressed. Input/Outputs of Problem The input was the key pressed on the touchpad by the user while the outputs were the corresponding ASCII of the key to be used by the program Algorithm The first function in the algorithm is pollReadKey which is used to check if a key has been pressed or not, which allows the program to check if a key has been pressed without a key necessarily being pressed. This is different from the readKey() function which waits for a key to be pressed, instead this function checks if a key has been pressed, then if pressed it will return the key character and if not it will return NOKEY which has value 0. Part two: Problem We were tasked to create a subroutine, delayms which implements a delay based on the number of milliseconds specified by the numerical value of the input given. Input/Outputs of Problem This delayms function was used for the debouncing problem for the keys. The input to the function was the time in ms, which was used to associate the amount that was wished to be delayed. This function did not have an actual output but the result of it causes a delay to be used in different situations. Conclusion: From this lab we concluded that user input can be read from a touchpad by using modular code along with subroutines and in order to overcome challenges such as key debouncing additional software scanning techniques must be implemented. We also noticed that if a subroutine is created for some purpose, new code can be implemented very easily by reusing your previous code [Show More]

Last updated: 1 year ago

Preview 1 out of 10 pages

Reviews( 0 )

$8.50

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
94
0

Document information


Connected school, study & course


About the document


Uploaded On

Oct 14, 2020

Number of pages

10

Written in

Seller


seller-icon
QuizMaster

Member since 4 years

1086 Documents Sold


Additional information

This document has been written for:

Uploaded

Oct 14, 2020

Downloads

 0

Views

 94

Document Keyword Tags

Recommended For You

What is Browsegrades

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 are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·