CONFIG POWERMODE/de

From MCS Wiki AVR
Jump to: navigation, search

Contents

Funktion

Versetzt den Mikrocontroller in einen der unterstützten Stromspar-Modi.

 

 

Syntax

CONFIG POWERMODE mode

 

 

Remarks

Die unterstützten Modi sind je nach Mikrocontroller-Type unterschiedlich.

Einige gültige Modi sind:

- IDLE

- POWERDOWN

- STANDBY

- ADCNOISE

- POWERSAVE

 

Die Modi und deren genaues Verhalten unterscheiden sich je nach Mikrocontroller-Type. Die folgenden Beschreibungen wurden dem Datenblatt des Mega88P entnommen.

 

IDLE MODUS

Der Idle-Modus stoppt die CPU aber erlaubt SPI, USART, Analog Comparator, ADC, 2-wire Serial

Interface, Timer/Counters, Watchdog, und dem Interrupt System das Aufwecken.Dieser Stromspar-Modus

hält im Grunde genommen clkCPU und clkFLASH an währen die andern Taktgeber weiter laufen.

Der Idle Modus ermöglicht es, den Mikrocontroller durch level-gesteuerte externe Interrupts oder interne Interrupts aufzuwecken.

Ebenso durch Timer-Überlauf oder USART Transmit Complete Interrupts. Wenn Aufwecken durch den

Analog Comparator Interrupt nicht benötigt wird dann kann der Analog Comparator ausgeschaltet werden indem

das ADC Bit im Analog Comparator Control and Status Register  ACSR gesetzt wird. Dadurch wird

der Stromverbrauch im Idle-Modus reduziert. Wenn der ADC enabled ist dann startet automatisch eine Konversion

wenn dieser Modus eintritt.

 

ADC NOISE REDUCTION

This mode will stop the CPU but allowing the ADC, the external interrupts, the 2-

wire Serial Interface address watch, Timer/Counter2(1), and the Watchdog to continue operating

(if enabled). This sleep mode basically halts clkI/O, clkCPU, and clkFLASH, while allowing the other

clocks to run.

This improves the noise environment for the ADC, enabling higher resolution measurements. If

the ADC is enabled, a conversion starts automatically when this mode is entered. Apart from the

ADC Conversion Complete interrupt, only an External Reset, a Watchdog System Reset, a

Watchdog Interrupt, a Brown-out Reset, a 2-wire Serial Interface address match, a

Timer/Counter2 interrupt, an SPM/EEPROM ready interrupt, an external level interrupt on INT0

or INT1 or a pin change interrupt can wake up the MCU from ADC Noise Reduction mode.

 

POWERDOWN

In this mode, the external Oscillator is stopped, while the external interrupts, the 2-

wire Serial Interface address watch, and the Watchdog continue operating (if enabled). Only an

External Reset, a Watchdog System Reset, a Watchdog Interrupt, a Brown-out Reset, a 2-wire

Serial Interface address match, an external level interrupt on INT0 or INT1, or a pin change

interrupt can wake up the MCU. This sleep mode basically halts all generated clocks, allowing

operation of asynchronous modules only.

Note that if a level triggered interrupt is used for wake-up from Power-down mode, the changed

level must be held for some time to wake up the MCU.

When waking up from Power-down mode, there is a delay from the wake-up condition occurs

until the wake-up becomes effective. This allows the clock to restart and become stable after

having been stopped. The wake-up period is defined by the same CKSEL Fuses that define the

Reset Time-out period, as described in Clock Sources

 

POWERSAVE

This mode is identical to Power-down, with one exception:

If Timer/Counter2 is enabled, it will keep running during sleep. The device can wake up from

either Timer Overflow or Output Compare event from Timer/Counter2 if the corresponding

Timer/Counter2 interrupt enable bits are set in TIMSK2, and the Global Interrupt Enable bit in

SREG is set.

If Timer/Counter2 is not running, Power-down mode is recommended instead of Power-save

mode.

The Timer/Counter2 can be clocked both synchronously and asynchronously in Power-save

mode. If Timer/Counter2 is not using the asynchronous clock, the Timer/Counter Oscillator is

stopped during sleep. If Timer/Counter2 is not using the synchronous clock, the clock source is

stopped during sleep. Note that even if the synchronous clock is running in Power-save, this

clock is only available for Timer/Counter2.

 

STANDBY

Dieser Modus ist identisch mit Powerdown mit der Ausnahme, dass

der Oszillator weiter läuft. Aus dem Standby Modus wacht der Mikrocontroller

in sechs Takten auf.

 

 

EXTENDED STANDBY

Dieser Modus ist identisch mit

Powersave mit der Ausnahme, dass der Oszillator weiter läuft. Aus dem Extended Standby

Modus wacht der Mikrocontroller in sechs Takten auf.

 

 

Für Standby würde man also  POWER STANDBY benutzen.

Es ist auch möglich, POWERDOWN, IDLE oder POWERSAVE zu benutzen. Diese Modei waren/sind von den meisten Mikrocontroller-Typen unterstützt. Es wird empfohlen, den neuen CONFIG POWERMODE Befehl zu benutzen weil er mehr Modi ermöglicht.

 

 

 

Siehe auch

IDLEPOWERDOWN , POWERSAVE

 

 

Beispiel


CONFIG POWERMODE = IDLE

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language