Or you could even use a power socket with an NC switch built into one of the contacts, as most fo them have. Much easier, it's what the vast majority of mains/battery appliances use. (Although their long term reliability is not terrific) Mike Rigby-Jones mrjones@nortelnetworks.com > erik wrote: > > > > Hello, > > I'm finishing up my first (?real?) PIC project. A chess clock. I'd like > > to power it with either a 9V battery or a little wall transformer. > > > > I'm guessing there is an IC out there to switch between supplies. Or > > maybe there is some other trivial way to do this. > > > > Any help would be much appreciated. > > > > Thanks, > > Erik > > One way would be to use diode "Or"-ing (use a power supply that has > over 9V output - which would include most 9V wall warts!) - Common > cathodes, an anode to +9V and +WallWartIn, and the system picks the > higher voltage automagically. Cheap, too. (Do lose a diode drop's > worth of power - an FET or BJT circuit might be better if switching > between 2 battery sources.) One project used this with a bridge > rectifier they had scads of, as a reverse voltage protection/spike > protector (connect the common anodes to ground, though Battery & Wall > Wart then need to share grounds.) "Think Devious" > > Mark >