Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q.1 (1 pnts): True or False: A Port for the C8051F020 consists of 32 digital Pins. Q.2 (1 pnts): True or False: An output pin
Q.1 (1 pnts): True or False: A Port for the C8051F020 consists of 32 digital Pins." Q.2 (1 pnts): True or False: An output pin will not work without setting it to high-impedance. Q.3 (6 pnts): Several components are connected to the microcontroller via the ports and pins as listed in the table below. On the right are partially incorrect initialization for the ports. Provide the lines of code necessary for reconfiguring the unconfigured, partially configured, or incorrectly configured pins listed in the table only. Device sbit Port Pin Pushbutton 1 PB1 1 7 Pushbutton 2 PB2 1 1 LED (RED) LDR 1 4 LED (GREEN) LDG 2 0 Potentiometer 1 N/A 1 5 Potentiometer 2 N/A 1 6 void PortInitialization (void) { PIMDOUT = OxF0; P1MDIN = 0x68; P1 = 0x68; } Q.4 (3 pnts): Provide a segment of code that would light up LDG when PB1 is pressed while PB2 is not pressed and would light up LDR for all other cases
Step 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