For a good answer you need to provide more information. But based on what you stated, you could do this with two diodes to switch power and another diode-R-C network to tell the PIC that AC power has gone bye-bye. The alarm can then be whatever you wish: LED, buzzer, siren, etc. If this is a one-off application, you could buy a computer battery-backup power supply (often called UPS - Uninterruptible Power Supply) which will do everything you want. Miguel Reznicek wrote: > Friends: > > Does someone know of a PIC chip circuit that will monitor the 220 VAC mains > and use them to run, but that can automatically switch to a battery power > when the mains fails? I need to make an alarm for when the power fails. > > Thanks in advance, > > Miguel Reznicek > mreznicek@pretensa.com > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist