Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help to solve these three questions, Thanks. For each of the following questions, produce valid C code in order to modify the desired variable's

image text in transcribed

please help to solve these three questions, Thanks.

For each of the following questions, produce valid C code in order to modify the desired variable's bits while not modifying the other bits. Remember that the least significant bit in a byte is BITO and the most significant bit in a byte BITZ Q2 Testing of bits 2 Points Given variable unsigned char input; do the following: Q2.1 1 Point ... test if BIT3 is TRUE and if so, print out "yes". Enter your answer here Save Answer Q2.2 1 Point ... test if BITS is FALSE and if so, set the BIT1 to FALSE. Enter your answer here Save Answer Q3 SFR Use 4 Points There are 3 inputs (P1.2, P1.5, P1.7) to the microcontroller and 3 outputs (P11, P1.6, P2.7) Write the Port_Init() function to fully configure all of the pins needed while not modifying others. void Port_Init(void) { Enter your answer there Save Answer Q4 sbits 1 Point Create an "sbit" (Simulation version) for a digital light sensor (LS) attached to Pin 2 of Port 3. Enter your answer here Save Answer e For each of the following questions, produce valid C code in order to modify the desired variable's bits while not modifying the other bits. Remember that the least significant bit in a byte is BITO and the most significant bit in a byte BITZ Q2 Testing of bits 2 Points Given variable unsigned char input; do the following: Q2.1 1 Point ... test if BIT3 is TRUE and if so, print out "yes". Enter your answer here Save Answer Q2.2 1 Point ... test if BITS is FALSE and if so, set the BIT1 to FALSE. Enter your answer here Save Answer Q3 SFR Use 4 Points There are 3 inputs (P1.2, P1.5, P1.7) to the microcontroller and 3 outputs (P11, P1.6, P2.7) Write the Port_Init() function to fully configure all of the pins needed while not modifying others. void Port_Init(void) { Enter your answer there Save Answer Q4 sbits 1 Point Create an "sbit" (Simulation version) for a digital light sensor (LS) attached to Pin 2 of Port 3. Enter your answer here Save Answer e

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

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

=+ Understand workplace aggression.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago