Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Our MSP430F5529 Launchpad-based lab board has several digital IO devices on it including 2 LEDs, 2 push buttons, and a 3 x 4 keypad. (a)

Our MSP430F5529 Launchpad-based lab board has several digital IO devices on it including 2 LEDs, 2 push buttons, and a 3 x 4 keypad.

(a) Referring to resources like the MSP430F5529 Launchpad User's Guide and posted schematics for our lab board, fill out a table like the one below listing all the ports, pins, and MSP430F5529package pins to which each of these devices is connected.

image text in transcribed

b) Are the 2 user LEDs on the Launchpad inputs or outputs? How do you know? What logic level (1 or 0) will cause the user LEDs to light? Explain your answer.

(c) Here is the keypad configuration function and part of the getKeyfunction which from the demo project and how column 1 of the keypad is connected to the MSP430F5529.

void configKeypad(void)

{

// Configure digital IO for keypad

// smj -- 27 Dec 2015

// Col1 = P1.5 =

// Col2 = P2.4 =

// Col3 = P2.5 =

// Row1 = P4.3 =

// Row2 = P1.2 =

// Row3 = P1.3 =

// Row4 = P1.4 =

// Select pins for digital IO

P1SEL &= ~(BIT5|BIT4|BIT3|BIT2);

P2SEL &= ~(BIT5|BIT4);

P4SEL &= ~(BIT3);

// Columns are ?

P2DIR |= (BIT5|BIT4);

P1DIR |= BIT5;

P2OUT |= (BIT5|BIT4); //

P1OUT |= BIT5; //

// Rows are ?

P1DIR &= ~(BIT2|BIT3|BIT4);

P4DIR &= ~(BIT3);

P4REN |= (BIT3); //

P1REN |= (BIT2|BIT3|BIT4);

P4OUT |= (BIT3); //

P1OUT |= (BIT2|BIT3|BIT4);

}

From getKey()

P1OUT &= ~BIT5;

P2OUT |= BIT4;

P2OUT |= BIT5;

if ((P4IN &

BIT3)==0)

ret_val = '3';

if ((P1IN & BIT2)==0)

ret_val = '6';

if ((P1IN & BIT3)==0)

ret_val = '9';

if ((P1IN & BIT4)==0)

ret_val = '#';

P2OUT |= BIT5

Fully describe the operation of the keypad. Indicate whether the various pins P1.5, P2.4,P2.5,P4.3,P1.2,P1.3and P1.4are inputs or outputs. On which ports and pins are the pull resistors being used. Are they pulled up or pulled down? Why are they necessary? Fully describe how the column read (from getKey) works. To what logic value (0 or 1) must P1.5 be set to be able to detect a key press in one of the rows in column 1. Explain.

image text in transcribed

Device I/O Port and Pins MSP430F5529 Package Pins 2 Launchpad User Buttons 2 Launchpad Used LEDs Keypad (shown below) P1.5 col 1 of keypad P4.3 1 MSP430F 5529 Pressing the key closes the switch P1.2 P1.3 7 P1.4 Device I/O Port and Pins MSP430F5529 Package Pins 2 Launchpad User Buttons 2 Launchpad Used LEDs Keypad (shown below) P1.5 col 1 of keypad P4.3 1 MSP430F 5529 Pressing the key closes the switch P1.2 P1.3 7 P1.4

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago