Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions