Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

;Fill in the blank using CCS ;MSP432 microcontroller ; Setting the RGB LEDs color according to the status of the switches. ; Question 1 (Switches)

;Fill in the blank using CCS

;MSP432 microcontroller

; Setting the RGB LEDs color according to the status of the switches.

; Question 1 (Switches)

; Switch S1:

; From the evaluation board schematics determine: which I/O port and bit#

; is connected to S1, and is it connected as positive or negative logic?

; Switch S2:

; From the evaluation board schematics determine: which I/O port and bit#

; is connected to S2, and is it connected as positive or negative logic?

; (Hints: you need a pull-up resistor for negative logic input)

; Question 2 (LEDs)

; built-in red LED is connected to which I/O port and bit#?

; built-in green LED is connected to which I/O port and bit#?

; built-in blue LED is connected to which I/O port and bit#?

;Red, Green, Blue:constant to turn LED ON

;SW1 : input value S1 pressed

;SW2 : input value S2 pressed

;SW12 :value S1 and S2 pressed

;NOSW : S1 and S2 not pressed

P1IN .field 0x40004C00 ,32 ; Port x Input

P1OUT .field 0x40004C02 ,32 ; Port x Output

P1DIR .field 0x40004C04 ,32 ; Port x Direction

P1REN .field 0x40004C06 ,32 ; Port x Resistor Enable

P1DS .field 0x40004C08 ,32 ; Port x Drive Strength

P1SEL0 .field 0x40004C0A ,32 ; Port x Select 0

P1SEL1 .field 0x40004C0C ,32 ; Port x Select 1

; I/O mapping for I/O port y used for output

; (replace y with the correct number)

P2IN .field 0x40004C01 ,32 ; Port y Input

P2OUT .field 0x40004C03 ,32 ; Port y Output

P2DIR .field 0x40004C05 ,32 ; Port y Direction

P2REN .field 0x40004C07 ,32 ; Port y Resistor Enable

P2DS .field 0x40004C09 ,32 ; Port y Drive Strength

P2SEL0 .field 0x40004C0B ,32 ; Port y Select 0

P2SEL1 .field 0x40004C0D ,32 ; Port y Select 1

;red 0x01, green 0x02, blue 0x04

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

Understand why empowerment is so important in many frontline jobs.

Answered: 1 week ago