From: Matthias T. <mt...@we...> - 2011-04-04 18:16:53
|
Hi, > Hi, as the amforth will not be a subject of power computing let me > ask the experts following: > 1. would it be possible to create a mechanism where amforth/atmega > will be run on _very_ low power - basically powerdown or sleep I did not yet implemented it, but the strategy should be strait forward (as far as I understood the sleep mode section): 1) use the multitasker 2) setup an idle task which does nothing but enter the right sleep mode 3) whenever an interrupt is able to wake up the controller, the processing will continue. Sooner or later the multitasker will re-call the sleep task and everything is quiet again. > 2. the rx will be connected to an additional interrupt pin The usart interrupts can trigger the sleep-end condition itself. > 3. after receiving a character it will issue some message on state - > that everything is ok (e.g. none reset or power-off occured) and it > will start to communicate with us in a normal way.. After leaving the sleep mode, the controller continues just like if nothing has happened. Until the next sleep instruction is called (there is a stupid wrapper word in the dictionary which does nothing but call the SLEEP intruction.) > 4. when not communicating with host for e.g. 10sec, or none tasks to > accomplish, it will go to low power state again.. why wait? whenever the idle task is activated, the main task has nothing to do at all. Some googling revealed some pitfalls (connected usart devices or connected programming tools like debuggers may prevent the power save effects) however. in German: http://www.mikrocontroller.net/articles/Sleep_Mode I'd like to hear if it works. If it doesn't of course too Matthias |