Question: Using E - Blocks - Flowcode v 5 Using E - Blocks - Flowcode v 5 Create a flowcode program which turns on all pins

Using E-Blocks - Flowcode v5 Using E-Blocks - Flowcode v5
Create a flowcode program which turns on all pins on PORTB sequentially for
0.2 second.
Example:- Turn on RB0 only for 0.2 seconds, then RB1, then RB2 and so on.
When RB7 has turned on, then the cycle must repeat back at RB0, RB1 etc.
Hint:- Create a variable say count which is used to drive PortB where you initialize
the variable count to 1 and then multiply it by 2 on each iteration of the loop. You will
also need to take into account when the count variable overflows, so it starts back at
B0 after B7 illumina
Modify the previous exercise 1) so that when RB7 turns on the next light to turn on
is no longer RB0, but RB6, then RB5, RB4 etc. The idea here is to create a Night
Rider Effect on the lights.
Hint:- Use a variable which is called say count_dir which detects that you are
counting up (count = count *2). When the count value reaches 128 you change the
variable count_dir to 0 and then count down (count = count /2).
Create a flowcode program which turns on all pins on PORTB sequentially for
0.2 second.
Example:- Turn on RB0 only for 0.2 seconds, then RB1, then RB2 and so on.
When RB7 has turned on, then the cycle must repeat back at RB0, RB1 etc.
Hint:- Create a variable say count which is used to drive PortB where you initialize
the variable count to 1 and then multiply it by 2 on each iteration of the loop. You will
also need to take into account when the count variable overflows, so it starts back at
B0 after B7 illumina
Modify the previous exercise 1) so that when RB7 turns on the next light to turn on
is no longer RB0, but RB6, then RB5, RB4 etc. The idea here is to create a Night
Rider Effect on the lights.
Hint:- Use a variable which is called say count_dir which detects that you are
counting up (count = count *2). When the count value reaches 128 you change the
variable count_dir to 0 and then count down (count = count /2).
Using E - Blocks - Flowcode v 5 Using E - Blocks

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!