Another version:
In this version I took PORTB of the AT90S1200 AVR microcontroller as you can see in the diagram, because this makes it simpler to let 8 LEDs flash back and forth. Set the Data Direction Register of port B as an output, the output will source current. What I did is loading an EEPROM-table in the AVR and reading each address into PORTB. There are ofcourse many ways to program this little gadget. If you use a 3 Volt battery and SMD components you can make e.g. an earring, e.g. set the LEDs in a circle, etc., just use your fantasy and something nice will come out of it. Here the complete assembly listing and also the hex-dump:
Part list:
8x low-current LEDs
1x 1k ohm
1x 10k ohm
1x AT90S1200
2x 1N4007
1x 100n
1x 47uF/16V
1x 78L05
For more detail: 8 LED Knight Rider using AVR microcontroller