Is there a way to put the Propeller to "sleep" ?
One of my Menu options turns off a display to conserve power. I use a rotary encoder with a center push button to select it. By pushing the button or rotating the encoder brings the display back on.
I assume I can use cogstop to stop all but the main menu method but is there a command to put it in low power mode? If so is it much of a savings in power? Any examples welcome.
Thanks.
Don
I assume I can use cogstop to stop all but the main menu method but is there a command to put it in low power mode? If so is it much of a savings in power? Any examples welcome.
Thanks.
Don
Comments
-Phil
[post=1003139]Changing clock rates in program[/post]
[SIZE=2]PUB RCslow_Xtal_Cycle_Power_Demo repeat ' set all i/o to minimal power states ' flush all tx buffers. clk_slowRC ' slow to 20 kHz waitpne(ina[27]<<27, |<27, 0] ' get state of pin 27 then wait for it to change to opposite state clk_fastRC_xtal_On ' turn on xtal osc, but now operating on RCfast at ~12 MHz ' now Prop is operating at 12 MHz and can execute code that has non-critical timing. waitcnt(clkfreq/100 + cnt) ' this 10 millisecond delay allows xtal oscillator to become stable. clk_xtal(80) ' switch over from RCfast to xtal to operate at 80 MHz ' within 75 microseconds, Prop is operating at 80MHz and can execute time-critical code waitcnt(clkfreq + cnt) ' this is one second for the demo, to repeat, back to low power PRI clk_slowRC clkset(%0_00_00_001, 20_000) ' drop to RCSLOW at ~20 KHz PRI clk_fastRC clkset(0_00_00_000, 12_000_000) ' xtal oscillator off, operating on RCfast at ~12MHz PRI clk_fastRC_Xtal_On clkset(%0_11_01_000, 12_000_000) ' xtal osc & pll on, xtal1 drive is on, still operating on RCfast PRI clk_xtal(MHz) clkset(%0_11_01_000 | >|(MHz/5)+2, MHz*1_000_000) ' switch xtal+pll, MHz must be 5, 10, 20, 40 or 80[/SIZE]