Question: 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

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

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!