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 STK500 board that repeatedly lets the user enter a digit by pressing a
button on the 4 x 3 keypad. The program then displays the digit on the 7-segment display. Name your program as lab1t4.c.
The 4 x 3 keypad is to be connected to Port B of the STK500 board.
The 7-segment display is to be connected to Port A of the STK500 board.
Based on the code that you have written for Task 4, create two C functions read_keypad() and display_7led(). The Function read_keypad() 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 0. The keypad is assumed to be connected to Port A.
unsigned char read_keypad(){
// your code here
}
The Function display_7led() should accept the ASCII code of a character, and display the character on the 7-segment display. The 7-segment display is assumed to be connected to Port B.
void display_7led(unsigned char a){
// your code here
}
Write and test a C program called lab1t5.c that uses the two functions above to achieve the same functionality as in Task 4Reading a keypad press and showing on the 7-segment display.

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!