Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this question, you are going to use the DDR, PORT, and PIN registers from your AVR device (the register definitions are the same as

image text in transcribedimage text in transcribed

In this question, you are going to use the DDR, PORT, and PIN registers from your AVR device (the register definitions are the same as your AVR device) with a 3x3 keypad. You use 6 pins from Port C as shown below: PCO PC1 PC2 PC3 1 2 3 3 PC4 5 5 6 PC5 7 8 00 9 Note: You can ignore button bounce effects. Based on this description, a) [10 pts] Implement the keypad initialization function below that initializes the ports and pins (i.e. setting pins input vs. output, setting the pull-up property, etc.). void keypad_init() b) [15 pts] Implement the keypad scan function below that continuously scans the keypad, and returns the character corresponding to the pressed button. char keypad_scan() { // keypad character array const char keypad [3713] ={{ '1','2', '3'}, {'4', '5', '6'}, {'7', '9', '9'}}; while (1) In this question, you are going to use the DDR, PORT, and PIN registers from your AVR device (the register definitions are the same as your AVR device) with a 3x3 keypad. You use 6 pins from Port C as shown below: PCO PC1 PC2 PC3 1 2 3 3 PC4 5 5 6 PC5 7 8 00 9 Note: You can ignore button bounce effects. Based on this description, a) [10 pts] Implement the keypad initialization function below that initializes the ports and pins (i.e. setting pins input vs. output, setting the pull-up property, etc.). void keypad_init() b) [15 pts] Implement the keypad scan function below that continuously scans the keypad, and returns the character corresponding to the pressed button. char keypad_scan() { // keypad character array const char keypad [3713] ={{ '1','2', '3'}, {'4', '5', '6'}, {'7', '9', '9'}}; while (1)

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

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions