Question: Modify the program to only display 4 LSB values of the 1 6 - bit counter on 4 LSB of PORTC ( i . e
Modify the program to only display LSB values of the bit counter on LSB of
PORTC ie RCRC Note that the other bits of PORTC should not change at all.
Use PORTC xFF ie all in the SETUP as the initial value
Hint: You can do this by reading PORTC, changing the required bits, and writing it
back as explained in the following steps:
Reed PORTC and clear LSB values using & AND This masking.
Mask all unwanted bits of the counter to keep only LSB values using &
Add two values together and send it to PORTC. You can also use OR
instead of adding.
Verify that the program works as expected.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
