Hi,
laut Bascom Hilfe solltest du den Befehl "Config Powermode" verwenden (sprich Config Powermode Idle).
Im Datenblatt zum Mega16 steht folgendes zum Idle:
When the SM2..0 bits are written to 000, the SLEEP instruction makes the MCU enter Idle
mode, stopping the CPU but allowing SPI, USART, Analog Comparator, ADC, Two-wire Serial
Interface, Timer/Counters, Watchdog, and the interrupt system to continue operating. This sleep
mode basically halts clkCPU and clkFLASH, while allowing the other clocks to run.
Idle mode enables the MCU to wake up from external triggered interrupts as well as internal
ones like the Timer Overflow and USART Transmit Complete interrupts. If wake-up from the
Analog Comparator interrupt is not required, the Analog Comparator can be powered down by
setting the ACD bit in the Analog Comparator Control and Status Register – ACSR. This will
reduce power consumption in Idle mode. If the ADC is enabled, a conversion starts automatically
when this mode is entered.
Und das hier sollte deine Frage beantworten:
Idle mode enables the MCU to wake up from external triggered interrupts as well as internal
ones like the Timer Overflow and USART Transmit Complete interrupts.
Da steht soviel wie das die MCU ebenso bei einem externen Interrupt wie auch interne Interrupts aufgeweckt wird.
Wenn du also den USART Interrupt verwendest (also kein "Input", "Waitkey", usw.) kannst du damit deinen Controller aus dem Idle-Mode rausholen.
Lesezeichen