Question
I need help writing this program assignment in C language, thank you. For this assignment were using PIC18F4620. Write an endless loop where the lowest
I need help writing this program assignment in C language, thank you. For this assignment were using PIC18F4620.
Write an endless loop where the lowest three pins of the DIP Switch SW1 (pins connected to port A bits 0 through 2) are read and then these three bits are outputs to the port C whereas the following color will be generated on the LED D1:
Note: . Dont forget to add the TRISB command for this port B in your code. Show the operation of this part by changing the switch settings of SW1 and check that the color of the RGB LED D1 matches with the combination of the switch. Make sure that the most significant bit of SW1 is on the left side of that switch and the LSB is on the right side.
Inputs (SW1) Outputs (D1) 0.00 RA2 RAI RAO 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 fo-ord 0000 RB2 RB1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 RBO Color 0 No light 1 Red 0 Green 1 Yellow 0 Blue 1 Purple 0 Cyan 1 WhiteStep 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