Alright Guys
Please forgive me if this sounds trivial, I'm very new with PIC programing.
Anyway I'm trying to find away to change the rate an LED flashes using a buttons input.
Any Ideas?
I made this, which has a delay and turns the LED on and off:
for (i = 0; i < 130; i++) //I got this type of delay out of the evil genius book.
for (j = 0; j < 40; j++);
RA5 = RA5 ^ 1; // Switches LED On and Off
if (0 == RA3) // If the Button is pressed
{
//Somehow increase the delay so the led flashes faster"
}
Im using a PICkit1 with the 16f684 PIC.
Cheers Guys
Please forgive me if this sounds trivial, I'm very new with PIC programing.
Anyway I'm trying to find away to change the rate an LED flashes using a buttons input.
Any Ideas?
I made this, which has a delay and turns the LED on and off:
for (i = 0; i < 130; i++) //I got this type of delay out of the evil genius book.
for (j = 0; j < 40; j++);
RA5 = RA5 ^ 1; // Switches LED On and Off
if (0 == RA3) // If the Button is pressed
{
//Somehow increase the delay so the led flashes faster"
}
Im using a PICkit1 with the 16f684 PIC.
Cheers Guys