CS 273: Power Management

The HC11 has quite a few facilities for power management, both by enabling and disabling specific features and by shutting down the processor itself (with a way to restart).

Subsystem Power Management

While much of the HC11's chip is simply enabled by default, some specific components take extra power and can be controlled. A couple of particular subsystems that can be controlled are the A/D subsystem and the serial communications subsystem. Since these subsystems take extra power to operate, you can get better battery life by shutting them down when not needed.

A/D Subsystem

At RESET time, the A/D system is disabled. In order to turn it on, you need to write a 1 to the ADPU bit (that's bit 7) of the system configuration options register at address $1039.

Serial Communications

The HC11 actually has two serial communications systems: the asynchronous serial communications interface (SCI) and the synchronous serial peripheral interface (SPI). The systems have different purposes, and are controlled separately.

The SCI uses what used to be the standard communications interface for low-speed devices, EIA-232 (formerly known as RS-232). This was an interface that was in widespread use for decades, but which has (thankfully!) been largely superceded by USB in recent years. It's likely your desktop computer has a serial port — that's an EIA-232 port. It's disappearing in recent years from laptops (mine doesn't have one), and I've heard that some newer desktops don't have it, though the last couple of machines I built a few months ago still did. The downloader for the HC11 runs on the SCI.

Like the A/D subsystem, the SCI is disabled at startup. To use it, you need to turn on its transmitter and its receiver; these are both controlled by bits in SCI Control Register 2, located at $102D. The system can also be set to passively listen, and automatically wake up under certain circumstances.

The SPI is a synchronous serial interface, intended for use in a simple networked environment (yes! It's possible to have a network of HC11s!). Since we don't make any use of the SPI, we don't even wire up a connector for it on the miniboard. It is controlled separately from the SCI; it is enabled through a bit in the SPI Control Register at $1028.

Shutting Down the CPU

Finally, in an interrupt-driven environment, it's possible to turn off the CPU itself by executing a WAI (wait for interrupt) instruction. This performs all the stack manipulation of an interrupt, and then stops the CPU. When an interrupt occurs, the CPU awakens and processes it; another WAI is then typically used to shut down the CPU again. For many applications, a CPU can be shut down more than it's active.


Last modified: Mon Mar 31 09:05:38 MDT 2008

Valid HTML 4.01 Transitional