Hi
Yes. You can create a "delay_ms()" or "timer " to turn off and on "RB1".
If your program is just this "FOR" loop, it is not a problem and with "delay_ms()" you can control how long the "RB1" is on and off.
But if you have a program, loop, or line other than this loop "FOR":
An "delay_ms()" delay causes the program to run for several minutes in the same loop, and the next line of the program does not run until the loop is completed.
If you use a timer, the timer and the line of other programs are performed consecutively, and whenever the timer overflows and the time you want arrives, then the "RB1" turns off or on. In this way, the whole program does its job and is not delayed.