But, in this application, the nominal 10 usecs it rquires to execute these housekeeping chores is insignificant when compared with the task of turning an LED on and off for 200 msecs. As a rule of thumb it is wise to assume that if anything can go wrong, it will and structure your program such that is self correcting. Note that in using the above statement, I have violated my own guidance in not embedding hardware specific instructions in the code. A word of caution. I have that error more times than I care recall.
Uses switch statement to map switch setting into delay time.
However, a constant variable array is used to map the settings of RB6 and RB5 to a delay time. Uses const array to map switch setting into delay time. In this routine, the setting is mapped into one of four arrays of patterns. The pattern is sequentially output at a fixed flash rate. Constant variables may only be intialized.