Use a timer to increase the value of a variable. Display the lower three bits of that variable on the LEDs.