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

 Given the following code and keypad layout, give the hexadecimal value

that GetKey () will return when it is run while keys 6,

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!