Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following code and keypad layout, give the hexadecimal value that GetKey () will return when it is run while keys 6, 8, A,

image text in transcribed

image text in transcribed

Given the following code and keypad layout, give the hexadecimal value that GetKey () will return when it is run while keys 6, 8, A, and E are pressed row0 PORT (O] PORT1] PORT2] row 3 PORT (3] 10 K Read ke column 0 PORT 4] Voc 10 K Read column 1 PORT 5 Vcc 10 K Read ke column 2 PORT(6] Vce 10 K column 3 PORT 7) TRI SB & 0x0000000F; TRISB ! 0x000000F0 ; LATB 0x0000000F; unsigned char GetKey (void) unsigned char RowMask [4] {0x0E, 0x0D, 0x0B, 0x07); char row unsigned char input unsigned int KeyMask = 0; for (row=0; rowROWS ; row++) LATB = RowMask [row] ; input = (PORTB & 0xF0) >> 4; KeyMask l= input > 4; KeyMask l= input

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions