Email: Password: Remember Me | Create Account (Free)
DS80C320 Tutorial: Power Failure Functions

The 80C320 provides two new features to handle power failure conditions. The first feature is an automatic power failure reset and the other is a power failure interrupt.

Power Failure Reset

The 80C320 is equipped with an automatic power failure reset. This means that if the operating voltage drops below Vrst, the microcontoller will automatically enter a reset mode. The chip will remain in reset mode until normal operating voltage is restored. This reset is performed automatically requiring no special action on the part of the software or of the user.

Interesting Fact: This feature is important. A normal 8051, without such a feature, continues to run "normally" as power dips below the minimum. However, the 8051 may begin to execute bogus instructions and/or starts writing/reading incorrect values to and from memory locations. The power failure reset feature on the 80320 prevents a low power condition from causing strange and unexpected program behavior.

Power Failure Interrupt

A new interrupt can be enabled which is triggered when the operating voltage drops below Vpfi (see chip spec sheet.) This can be useful to make preparations for a power failure.

WDCON.5 (EPFI) is the enable for the Power Failure Interrupt. When this bit is set, a low operating voltage will trigger the interrupt. When the bit is clear, the interrupt will not be triggered.

WDCON.4 (PFI) is the flag that is set when the power falls below Vpfi. If the interrupt is enabled (via bit EPFI), an interrupt will be triggered when this bit is set. Even if the power failure interrupt is not set, this bit will be set to reflect a low-power status.

Once PFI is set by the hardware, software must clear it manually. The bit will not be cleared automatically.

The interrupt vector for the power failure interrupt is 0033h.

Previous: Watchdog Tutorial Contents Next: Dual Serial Port