Prop2 Clock Request
pjv
Posts: 1,903
Hi All;
My needs are low power operation·-several years on two AA batteries- and require to operate very fast for·several milliseconds and then return to the lowest power setting possibe for a specified period of time, typically several minutes to 1 hour. Presently I do this with an SX chip, but with its End Of Life in sight, I'm considering the Prop. But it has a rather ugly uncertainty for timing during the low power phase where the 20KHz oscillator would be used, making that approach unsuitable.
In the new Prop2, might it be possible to have a command that causes the 20KHz oscillator to run into a counter that is gated by one clock cycle of the higher speed oscillator -presumably a crystal one-, and thereby calibrating the actual speed of the 20KHz·RC clock? The delay software could then use this factor to more closely effect the desired low power delay time, and eliminate the need and cost of an external timekeeping device?
Precision timing at very low power and the lowest possible cost seem always a difficult thing to achieve.
Also, when running on RC clocks which require no stabilization, does the start-up timer need to be as long as at present (100 mSec I believe) ??
Cheers,
Peter (pjv)
·
My needs are low power operation·-several years on two AA batteries- and require to operate very fast for·several milliseconds and then return to the lowest power setting possibe for a specified period of time, typically several minutes to 1 hour. Presently I do this with an SX chip, but with its End Of Life in sight, I'm considering the Prop. But it has a rather ugly uncertainty for timing during the low power phase where the 20KHz oscillator would be used, making that approach unsuitable.
In the new Prop2, might it be possible to have a command that causes the 20KHz oscillator to run into a counter that is gated by one clock cycle of the higher speed oscillator -presumably a crystal one-, and thereby calibrating the actual speed of the 20KHz·RC clock? The delay software could then use this factor to more closely effect the desired low power delay time, and eliminate the need and cost of an external timekeeping device?
Precision timing at very low power and the lowest possible cost seem always a difficult thing to achieve.
Also, when running on RC clocks which require no stabilization, does the start-up timer need to be as long as at present (100 mSec I believe) ??
Cheers,
Peter (pjv)
·
Comments
The command I belive uses a pretty good percentage less power.
For example:
If you project monitors a button or something like that you can use (waitpeq) or (waitpne) to wait forever in a low power state until something happens.
Or you can use waitcnt and periodically sample some type of input.
However, you can just use a lower speed crystal if you want. The pll is optional. If you can find a low speed crystal the prop then can use that crystal. Then when something happens you can turn the pll on and speed the chip up to 16x its current speed. Then when you are done you can slow back down again.
Using both the techniques mentioned above you should be able to reach your goal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
I fully understand your suggestions, but they are inadequate for my needs.
Waitcnt is exacly what I'm now using with the 20KHz oscillator, but in order to reactivate the code at a particular time one has to know ahead of time how long to wait for. And if the speed of the RC oscillator is not accurately known, then this approach cannot work.
In order to keep the power consumption as low as possible, one needs the software to start at "just the right time" (or perhaps a millisecond or two before).
Running on a crystal during the long delay phase (500 uA at 5 MHz) is out of the question.
The only way to do this is with a known timing source, and hence my request for a calibration instruction/hardware.
Cheers,
Peter (pjv)
Due to the smaller geometry process, the Prop2 will have a *much higher* leakage current, so Prop1 is more appropriate to such extremely low power applications.
Have you considered adding an RTC chip to signal the Prop to wake up? I personally use the PCF8563 I2C RTC on Morpheus, and so far, I really like it.
Best,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+ Advanced dual Propeller SBC with XMM and 256 Color VGA - PCB, kit, A&T available NOW!
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
You are right, I now recall Chip saying the idle current was going to be higher. Bummer!
As far as an external timer is concerned, that's what I presently do in the SX world..... using the MAXIM Clock with 2K FRAM. Works great, but a little costly, so I was hoping to influence the Prop2 design to add the calibration feature.
Cheers,
Peter (pjv)
Bean
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Does that byte of memory hold "A", 65, $41 or %01000001 ?
Yes it does...
·
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.
I suspect the prop will work with a 32K crystal, but as Jonathan said, multiplying that up by 16 is too slow for the PLL as well as for comms and other needs when executing real programs. And of course using the 12 MHz then is again unstable.
This is all somewhat a moot point if the idle current is ugly (or in the realm of 5MHz crystal waiting operation), unless of course Chip will be shutting most silicon down while in a low power wait mode.
Hmmmm.....
In any case, RC calibration might still be a nice feature for some applications.
Cheers,
Peter (pjv)
-Phil
Now THERE's a drum that I would follow!!!
Wonderful solution.
Cheers,
Peter (pjv)
That's because you chose a really nice part, with FRAM - if you don't need the fram, the DIP-8 in qty.1 at Future is $1.49, smd in large lots is even cheaper.
The SOIC-8 PCF8583, which adds 256 bytes of battery backed ram is only $1.36 qty.1
Best,
Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
Morpheus & Mem+ Advanced dual Propeller SBC with XMM and 256 Color VGA - PCB, kit, A&T available NOW!
www.mikronauts.com - my site 6.250MHz custom Crystals for running Propellers at 100MHz
Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It reduces the power consumption of the cog, but you still have the overhead of the HUB and Clock circuits (which is not insignificant).
The only way to drop the power consumption of the prop to really low values is to slow the core right down.
2 years on a pair of Alkaline AA's (approximated as 3000mAH) is going to need a standby current of about 171uA.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Post Edited (BradC) : 8/11/2009 2:57:22 AM GMT
At present my Prop idles in WAITCNT with the 20KHz clock and consumes 7 uA... a wonderfully low number. Then it goes into full speed at 5MHz crystal for about 5 mSec (I know that you're not supposed to use the crystal oscillator for 10 mSec after activating it, but looking into that, it appears to work fine if it is left for only two or 3 mSec), does its work and goes back to idle speed for a few minutes. Total power is quite low because the crystal oscillator option is disabled during this time.
I believe if one REALLY squeezed things one might get 7 years out of the sulphur-iron lithium AA cells. Oh yeah, it also needs to operate at minus 40C. Fortunately the cells are OK with that.... not sure yet what the power impact of all the cicuitry will be.
At present I do this with an SX (draws zero current while asleep), and wakes up from an external RTC chip. Rather costly, and I was hoping to offset the added Prop cost with eliminating that device.
Compared to the SX, at this point I'm not sure the Prop1 reacts fast enough to do what I need, so lots of testing and brainstorming is in the offing!
With its pending advancements, I believe Prop2 to be a good candidate (cordic rotator instruction) so I was hoping for some calibration facility on the slow RC oscillator. That is of course very dependant on the as yet unknown static leakage current.
Cheers,
Peter (pjv)
Another thought: Add a cheap 6-pin PIC or 8-pin AVR, and program it to measure the width of an incoming pulse and parrot it back. Then, when the Prop is about ready to enter its manic phase, power up the little micro and send it a brief pulse from the Prop. Next, shift into high gear and measure the pulse being parroted back. The measured width is you calibration information. Finally, turn off the little micro, do the manic stuff, and shift back into low gear.
-Phil
Thanks, that would also work. and would be quite simple and cheap to boot.
Cheers,
Peter (pjv)