Skip to main content

Power management

The Altair running on Azure Sphere takes advantage of advanced power management features to reduce power consumption.

Automatic sleep

By default, the Altair emulator will auto sleep after 10 minutes of no terminal activity. Sleep will halt the Intel 8080 CPU emulator, disable WiFi, and place the Azure Sphere in low performance mode.

To wake the emulator, press button B on the Azure Sphere Developer Kit.

Power management settings

The following table describes how to use the power management settings. From the CP/M command prompt, run the power command.

The CP/M power command

CommandDescription
power dDisable power management
power eEnable power management
power sForce to the Altair to sleep

i8080 power management IO ports

The power management IO ports are used to control the power management settings. See the i8080 Azure Sphere specific ports for information on how to use the IO ports

The power management IO ports can be used to control the power management settings from your custom Altair applications. The following code snippets show how to control the power management.

These examples first disable the power management, then enable the power management, then set wake from sleep to 10 seconds, then force the Altair to sleep.

C code

outp(66, 0x00);     // Disable power management
outp(66, 0x01); // Enable power management
outp(67, 10); // Wake from sleep after 10 seconds
outp(66, 0x02); // Force to the Altair to sleep

Microsoft BASIC code

10 OUT 66, 0:   REM Disable power management
20 OUT 66, 1: REM Enable power management
30 OUT 67, 10: REM Wake from sleep after 10 seconds
40 OUT 66, 2: REM Force to the Altair to sleep

Assembly code

ORG 0100H   ;CP/M base of TPA (transient program area)
MVI A,0 ;Disable power management
OUT 66 ;Call sleep port

MVI A,1 ;Enable power management
OUT 66 ;Call sleep port

MVI A,10 ;Wake from sleep after 10 seconds
OUT 67 ;Call wake from sleep port

MVI A,2 ;Force sleep
OUT 66 ;Call sleep port

RET