> The cheapest way to turn on the battery when the power is off is to > use a diode. Also a small pnp + 3 resistors current charge is required > when accu is used. I think you can't find a chip less expensive than > all this devices. Vasile Actually you normally need two diodes, one from supply and one from the backup battery, to ram +vdd, and a pullup of 1M or so between ram +vdd and /ce to keep it disabled. A tiny twin diode in SOT23 and 1M pullup will work fine. Decouple the ram directly at its pins after the diodes with 0.1uF ceramic + 4.7uF tantalum, or as per manufacturer's data sheet. It is also necessary that the unpowered circuitry connected to /ce does not pull it low. One way is, to use a heftier pullup and a NPN transistor as 'fake' TTL input stage (E to driver, B to weak divider holding 1.8V when the base is not driven, and C to ram /ce). This circuit relies on the base being drawn to gnd when the external circuit is not powered (and thus the divider also not). Do not decouple the base divider with a capacitor. Another is to use a single 4S66F CMOS gate as separator on the /ce line with the enable wired to the reset or brownout sensor on the main powered circuit. Yet another is to use the /ce line hard-wired to a reset or power sense circuit that provides disable when the voltage goes away. Tieing it to a known good CPU monitor's output /reset line is a good way to avoid data corruption on turn on and turn off. There are specific chips that provide standby power, plus input/stadby switching, plus low battery sensing etc, like the Seiko S8230 and S8232 for exmaple. They also have a suitable /CE and reset driver built-in, plus a regulator for Vsby when it is provided from external power. Maybe you should look at these. I once made a DS1230Y replacement by gluing these parts and a small diameter (smaller than the 300mil wide 6116 body) lithium coin cell directly on the back of a 6116 SRAM. The /ce pin was cut off short and its remainder glued on below it with epoxy (with no electrical contact). Worked perfectly. Data retention was well over 1 year with a homemade design and can be >10 years with an industrial one. hope this helps, Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads