Answered step by step
Verified Expert Solution
Question
1 Approved Answer
For the keypad shown write a c program to initialize and setup msp430. You must use exactly follow the following directions: 1- Initialize, setup wait
For the keypad shown write a c program to initialize and setup msp430. You must use exactly follow the following directions: 1- Initialize, setup wait for key press 2- Enter LPM4. 3- If an interrupt is received from keypad go to the IsR. In this ISR: a. clear LPM4, disable further input interrups. b. Implement a software debounce using delay. c. Scan keypad and find the pressed key (value 1-6) into variable KEY, to implement this: i. Drive X1 low and the other columns X2 and X3 high. This makes the switches in column Xl active and the corresponding Y input goes low if a button is pressed. Thus we can detect the state of keys 1 or 4. Use switch case statement to find KEY. ii. Drive X2 low and the other columns high to read the keys in column X2. Use switch case statement to find KEY. iii. Drive X3 low and the other columns high to read the keys in column X3. Use switch case statement to find KEY. iv. if no keypress found return KEY=0. v. Show these three steps seperately one after another. d. Return to main from interrupt, enabling interrupts. 4- Repeat from (2) I/ --- C program to check a 2x4 keypad \#include / / Intrinsic functions I/ initialize here IF needed void main (void) \{ // remember there are no X and Y inputs in MSP, use real ports for these
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started