> > I want to build a programmable alarm-clock bases on a PIC. The use of > > it is to turn ON & OFF lamps, and radios in different parts of the > > house while I am on vacations (same time each day maybe for a week). Hi Have done similar thing with ST62x One port reads 4040 counter outputs(lower 5 bits). This is random number in minutes and seconds. Three spare switches TV, lounge light and kitchen. 4 more ports drive front rooms and barthroom. Only one of the 4 lights is on at any particular time. The tv+lounge+kitchen is always on. After 6 a random number is taken and represents the minutes to wait before any lights get switched. The seconds time is the delay between light off untill next light on Oh yes, which light will get switched on ? The bits of the 4040 decides that. There are more features but i'm wasting bandwidth. mail me. Regards Cassie