| |||||
µVision® IDE µVision® Debugger | Power-Saving ModesThe µVision Debugger simulates the Idle, Power Down, and Brownout Modes found on many 8051, 251, 166, and ARM devices. Typically, there is no dialog support for these power-saving modes. On the 8051, set Bit 0 of the PCON register to enable Idle Mode. For example: PCON |= 0x01; On the 8051, set Bit 1 of the PCON register to enable the Power-Down Mode. For example: PCON |= 0x02; On the 8051, you may check the status of the Power Off Flag by looking at Bit 4 of the PCON register. For example:
if (PCON &= 0x10) /* if POF is set */
{
printf ("COLD Start\n");
PCON &= ~0x10; /* CLR POF */
}
else /* if POF is clear */
{
printf ("WARM Start\n");
}
Brownouts are simulated using a virtual target register named BROWNOUT. When you set the BROWNOUT VTREG to a value of 1, the µVision Debugger simulates a brownout condition (a drop of the power supply below the trip point and its return to normal). For example: BROWNOUT = 1 A brownout typically triggers a reset or interrupt.
| ||||
| |||||