Answered step by step
Verified Expert Solution
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
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 eStep 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