i hate to go on a tangent about this, but here is what i am thinking, both of your points make tremendous sense but here is some of my code and though process...please let me know if i am on the right track about thinking about this....i am studying electrical engineering, and the programming half of it just don't not make any sense...so like i said before i am controlling leds on the rising edge and falling edge of the clock(i need to figure out power of the leds, so i need to know how long they are on for, which is the point of the thread) so my for lop runs though the pattern and inside the for loop i have the leds on separate counters that interrupt once, twice, four and eight times a second

so for this for loop
for (int i; i<1000; i++)
{
if(G_Flag1)
{
led1_on;
led2_off;
}
else
{
led1_off;
led2_on;
}

void Counter16_ISR(void)
{
G_Flag1= !G_Flag1;
num1=rand( );

}
this interrupt interrupts four times a second so would led1 and led 2 both be on for four times a second, depending if the clock was on a rising edge or falling edge right, or could they be on longer because the cpu clock is still less then 1000