Ok, use a reversed diode to the PIC with a low value resistor in series to the cells. It means, that if reversing cells polarity it will be drained by the resistor+diode. In real you would be short circuiting the cells, but not in a dangerous current (limited by the resistor). Calculate the resistor to drop only 50mV on normal operation, but when cells are inverted it will dissipate heat, leaving only the diode voltage drop to the PIC. For example, if the normal operation current is around 10mA, the resistor should be 50mV/10mA = 5 Ohms. If cells are assembled reversed, the diode will conduct directly over the resistor, so it will be 3V-0.6V(diode) / 5 Ohms = 480mA, enough to keep the reversed voltage over the PIC at 0.6V without exploding the cells. For better protection, you could use a Schottky diode or even an "old germanium diode" that drops only 0.2Vdc. If your circuit drain pulses of high current, bigger than 10mA, you can add an electrolytic capacitor in parallel to the 5 Ohms diode, as a bypass to those high surge periods. For sure, if you can afford to reduce 0.2Vdc from the PIC, install only the germanium diode in series with the cells... :) Wagner. Jason Langenauer wrote: > > On Mon, 08 Nov 1999, you wrote: > > Hello List, > > > > I have realized an alarm for my bycicle using a 12C508. It is powered by two AA > > size alkaline battery. > > > > I would like to know if there is a simple (and economic!!) solution which > > I can use to protect my circuit against polarity inversion during battery ch ange. > > (I know it's a remote possibility, but it exists) > > > > I thought to use a serie diode, but the voltage drop bring the PIC power vol tage > > near the power supply limit of the MCU. > > > I can't think of it right now, but there is an arrangement using a single > MOSFET which will provide this. Possibly the gate is connected to the drain, > possibly it is an N-channel MOSFET, and possibly the circuit is in Horowitz an d > Hill. It's a very simple circuit, but as I said, I can't think of it now (such > is the effect of a few beers..). Play around with this, and see what you can > come up with. I'll try again in the morning. > > Jason Langenauer > Mechanical and Space Enginnering, The University of Queensland > -- > Lady Astor: If you were my husband, I'd poison you drink. > Winston Churchill : If I was your husband, I'd drink it.