在断电时如何保存数据-How to Save Data Du

2011-05-29 10:57:22来源: 互联网
Abstract: The following application note discusses how the DS1233 can be used to save data during a power failure without corrupting the NV SRAM.

For many memory systems requiring nonvolatile memory, Dallas Semiconductor NV SRAMs offer an SRAM's ease of implementation coupled with write protection circuitry and a 10 year information storage capability. NV SRAMs automatically write protect themselves when they detect an out-of-tolerance condition (usually at 10% of VCC), making them a secure receptacle for data to be protected during a power failure.

One issue that is not addressed by the secure write protection strategy of the NV SRAM is this: what happens to the data currently being processed during a power failure? If the voltage has fallen to 10% of VCC, time has already run out to perform any system housekeeping functions such as storing off data and storing the state of the microprocessor. What is required to truly address this need to "save data before write-protecting memory" is a method to detect an impending power failure well before the power supply has fallen to 10% of VCC so that a microprocessor can perform these housekeeping functions.

One way to accomplish this task is to use a second voltage monitoring device. Dallas Semiconductor manufactures the DS1233B, a 5V-5% voltage monitor in a 3-pin TO-92 size package. This 5% monitor drives an active low reset signal, RST-bar, as soon as it detects an out-of-tolerance condition. This active low signal can be used as an IRQ-bar input to a microprocessor, providing the microprocessor with an advanced warning that the power supply is falling, and giving it time to service the interrupt before the system's nonvolatile memory has been write protected. The following diagram illustrates this concept.

5V - 5% IRQ-bar Generation



You might wonder of what use the time between a 5% and 10% drop in a 5V power supply could possibly be to a microprocessor. After all, don't power supplies fall rapidly when they do go through a hard failure? The answer is, yes, of course they do. But, fortunately, microprocessors can service interrupts and process information even faster. All that is required is that the system's interrupt servicing software be configured so that it quickly identifies and services external interrupts. An example follows of how useful this time can be.

For the sake of this discussion, let's make several assumptions about the conditions that exist inside of the system in question. Let's assume:

  1. That the power supply falls quickly, taking only 300 microseconds to fall from 4.75 to 4.0 volts.
  2. That the microprocessor in question runs at a relatively moderate clock speed of 25MHz.
  3. That this microprocessor is a common 8-bit device, requiring on the order of six clocks to execute a single instruction.
With this set of givens, how many instructions should the processor be able to execute between the 5% and 10% trip points on a 5V power supply?

1/25MHz = 40ns clocks

six clocks/instruction = 240ns per instruction

(4.75-4.00)/300 µs = 0.0025V/µs

5% - 10% drop = 0.25V; hence 5%-10% drop = 100µs

100µs/240ns per instruction = 416 instructions

Having 416 executable instructions at your disposal versus having none during a power down makes a big difference in saving 256 bytes of information or losing it, or in saving the state machine of the processor or losing it. In addition, the variables can be modified by design to give the processor even more time. The rate of fall of voltage of the power supply during a power failure can be slowed by adding capacitance. Processors requiring fewer than six clocks to execute an instruction can be used. In any case, using a DS1233B in conjunction with your NV SRAM requirements can give you the additional time you need to execute an orderly system shutdown, without corrupting your memory or allowing your microprocessor to run out of control.

Ordering Information



NV SRAM Pinouts

关键字:数据

编辑:神话 引用地址:http://www.eeworld.com.cn/mndz/2011/0529/article_9256.html
本网站转载的所有的文章、图片、音频视频文件等资料的版权归版权所有人所有,本站采用的非本站原创文章及图片等内容无法一一联系确认版权者。如果本网所选内容的文章作者及编辑认为其作品不宜公开自由传播,或不应无偿使用,请及时通过电子邮件或电话通知我们,以迅速采取适当措施,避免给双方造成不必要的经济损失。
论坛活动 E手掌握
微信扫一扫加关注
论坛活动 E手掌握
芯片资讯 锐利解读
微信扫一扫加关注
芯片资讯 锐利解读
推荐阅读
全部
数据

小广播

独家专题更多

富士通铁电随机存储器FRAM主题展馆
富士通铁电随机存储器FRAM主题展馆
馆内包含了 纵览FRAM、独立FRAM存储器专区、FRAM内置LSI专区三大部分内容。 
走,跟Molex一起去看《中国电子消费品趋势》!
走,跟Molex一起去看《中国电子消费品趋势》!
 
带你走进LED王国——Microchip LED应用专题
带你走进LED王国——Microchip LED应用专题
 
电子工程世界版权所有 京ICP证060456号 京ICP备10001474号 电信业务审批[2006]字第258号函 京公海网安备110108001534 Copyright © 2005-2016 EEWORLD.com.cn, Inc. All rights reserved