CEG 3136Lab 2: Hardware Interfacing - KeypadFall 2019Students:Purpose | 3Equipment | 3Part One: | 3Problem | 3Input/Outputs of Problem | 3Algorithm | 3Implementation | 8Testing | 8Part two: | 8Problem | 8Input/Outputs of Problem | 8Algorithm | 9Implementation | 9Testing and Validation | 10Conclusion: | 10PurposeThe purpose of this lab was to introduce the interfacing
...[Show More]
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
Testing | 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.
[Show Less]