
Power Management
1-11
1.1.7
Programming Example: Peripheral-Device Power
The simplest way to control peripheral devices is to integrate their control into the above
mode-based system. The élanSC310 microcontroller allows five external Power-Manage-
ment Control (PMC) pins to be activated in such a way that they can indicate to external
devices the mode of the system. Simple logic can be used to disable the peripheral when
the system is in specific modes.
Table 1-3
Power-Management Setup
Instruction
Ports
Index and Data
Comment
IOW
IOW
022h
023h
75h
0100 0000
Activity: DMA requests, IRQ15–IRQ2 (except IRQ8 and
IRQ4–IRQ3), keyboard, and MMS
Inactivity: AC adapter
IOW
IOW
022h
023h
76h
1011 0000
Activity: Hard disk drive, floppy disk drive, LPT, COM I/O, and
video memory accesses
Inactivity: Programmable I/O ports and memory ranges
IOW
IOW
022h
023h
08h
1110 0011
Activity: IRQ8 and IRQ4–IRQ3 (these wake up the system from
Sleep, Suspend, and Off modes)
IOW
IOW
022h
023h
AFh
1100 0000
Set the granularity of the Low-Speed to Doze Timer register to
14 s and the High-Speed to Low-Speed Timer register to
116 s, respectively.
IOW
IOW
022h
023h
83h
0000 0001
Set the High-Speed to Low-Speed Timer register to 116 s
(High-Speed to Low-Speed mode transition).
IOW
IOW
022h
023h
84h
0010 1000
Set the Low-Speed to Doze Timer register to 10 s (Low-Speed
to Doze mode transition).
IOW
IOW
022h
023h
85h
1001 0110
Set the Doze to Sleep Timer register to 10 min (Doze to Sleep
mode transition).
IOW
IOW
022h
023h
86h
1010 0000
Set the Sleep to Suspend Timer register to 10 s (Sleep to
Suspend mode transition).
IOW
IOW
022h
023h
87h
0011 1000
Set the Suspend to Off Timer register to 59 min, 44 s [1 hr]
(Suspend to Off mode transition).
Note:
For this and subsequent examples, the ndex registers cannot be programmed directly, but must be accessed
by writing the location of the index register to address 22h and the data for the index register to address 23h.
For example, the first I/O access in the above example can either be implemented using 8-bit accesses:
mov al,75h
out 22h,al
mov al,40h
out 23h,al
or 16-bit accesses:
mov ax,4075
out 22h,ax