Question: Create a decoder function The first component needed is a decoder function that will translate three 8 - bit color values into 2 4 consecutive
Create a decoder function
The first component needed is a decoder function that will translate three bit color values into consecutive calls to write or write The typical method used for this type of serialization of data is called mask and shift but there are many ways to implement it You will have to choose a method and implement it
Finally, dont forget to hold the output low for us to latch the data into the iLED waitus;
Write a function that does the above with the following declaration:
void writeColorint r int g int b;
Simulate your hardcoded color loop function and look at the resulting output on the Logic Analyzer.
QUESTION: How many cycles does your hard coded program take to write bits?
Replace the hardcoded calls to write write and waitus with your new writeColor function.
Simulate your new function.
QUESTION: How many cycles does your new function take to write bits?
Verify your new function operates correctly in hardware.
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
