Question: Write and test a C program for STK 5 0 0 board that repeatedly lets the user enter a digit by pressing a button on
Write and test a C program for STK board that repeatedly lets the user enter a digit by pressing a
button on the x keypad. The program then displays the digit on the segment display. Name your program as labtc
The x keypad is to be connected to Port B of the STK board.
The segment display is to be connected to Port A of the STK board.
Based on the code that you have written for Task create two C functions readkeypad and displayled The Function readkeypad should return the ASCII code of the key button that has been pressed on the keypad. If no key is pressed, the function will return The keypad is assumed to be connected to Port A
unsigned char readkeypad
your code here
The Function displayled should accept the ASCII code of a character, and display the character on the segment display. The segment display is assumed to be connected to Port B
void displayledunsigned char a
your code here
Write and test a C program called labtc that uses the two functions above to achieve the same functionality as in Task Reading a keypad press and showing on the segment display
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
