Shahid Sheikh wrote: > I'm using a 12C508 to control the lights in a HO scale model church. > On one of the desks in the church, I was planning on putting a real > tiny bulb and make it flicker like a candle. A yellow LCD might be good too - a "candle-like"" colour. > Anyone has an algorithm handy for making a bulb flicker like a candle? Well, concept yes. A 7-bit Pseudo-Random Binary Sequence Generator will generate a sequence of 128 steps. Running at 20 steps per second, this gives a cycle length of 6.4 seconds and it's unlikely that a viewer would notice a repeating cycle of that length. IIRC, the feedback steps for this are bits 1 and 7, or 6 and 7. Other loner sequences are better, but you have to know the fedback taps for maximal sequence. Someone *must* have a web reference. Scott? -- Cheers, Paul B.