Power up timing sequence for the prop
I am looking at utilizing the Prop in a project that will data log serial data. The procedure would normally be as follows:
1. Connect data logger device to serial bus.
2. Power applied to machine providing the serial data. Same power will also power the data logger device.
3. Specs for the machine specify that the serial communication starts no sooner than 200ms but 500ms is typical.
Herein lies my problem. I was intending the data logger device to derive its power from the machine so it powers up the same time as the machine. Both to simplify the design and the need for a battery, etc. However the Prop as I understand it takes time to load its image from EEPROM to the Prop and start running of approx 1.6 seconds. Am I correct on this?
So I would need to keep the prop powered prior to the data logging by way of a battery. Any comments here about power consumption for the Prop in a "low power standby mode"? Any ideas or experience with this?
Don
Renamed post.
Post Edited (Don M) : 2/8/2010 6:10:14 PM GMT
1. Connect data logger device to serial bus.
2. Power applied to machine providing the serial data. Same power will also power the data logger device.
3. Specs for the machine specify that the serial communication starts no sooner than 200ms but 500ms is typical.
Herein lies my problem. I was intending the data logger device to derive its power from the machine so it powers up the same time as the machine. Both to simplify the design and the need for a battery, etc. However the Prop as I understand it takes time to load its image from EEPROM to the Prop and start running of approx 1.6 seconds. Am I correct on this?
So I would need to keep the prop powered prior to the data logging by way of a battery. Any comments here about power consumption for the Prop in a "low power standby mode"? Any ideas or experience with this?
Don
Renamed post.
Post Edited (Don M) : 2/8/2010 6:10:14 PM GMT
Comments
Look at the Propeller datasheet for specifics on the power requirements. A Propeller can switch clock frequency "on the fly" and, using WAITCNT / WAITPNE / WAITPEQ instructions, running cogs can be put into low power mode. The clock frequency determines overall power consumption including hub functions and all cogs can be either stopped or put into low power mode dropping chip power consumption into the uA range.
Where do you plan to put the logged data? Remember that all sorts of storage devices require long times to initialize themselves, much longer than what a Propeller takes.
Power up --->clock in slow mode for 50ms--->Switches to fast mode ---> Runs built-in boot loader---> Looks for communication from PC host --->Finds none so looks to eeprom --->Loads image from eeprom into Prop ram--->Program starts running from Cog 0
There is mention of 100ms but it is not clear to me if that is the expected total run time of the above mention process or what.
The data will be starting after 200ms at a rate of 9600 baud.
If you have two propellers you could have PropA reset ProbB and start a timer, have PropA time how long it takes for PropB to execute it's first command (setting a pin). I would do it if I had the time right now. Maybe tomorrow. I am kind of curious too.
Off hand, anyone know how long it takes to launch a cog.
EDIT: That is, if I were to launch a PASM cog from SPIN, how many clocks before the first PASM command would execute?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
Post Edited (Bobb Fwed) : 2/9/2010 12:31:34 AM GMT
If you're using an SD card for datalogging, the SD card takes a while to be initialized once it's powered up. If you're using a FAT file system, then you have to open the log file too.
You're going to have to keep the Propeller powered up or add some kind of buffering for the log data.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
You could start all the cogs loading and then do the clock switch while they boot up. You should be able to go from ultra low power to full speed in less than 20ms (limited by PLL settling time).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life may be "too short", but it's the longest thing we ever do.
I don't know how to implement Bradc's suggestion to see if it is any faster. Any and all comments welcome. If anyone has a simple program they would like to forward here to test this theory please do so. I'll be glad to show the results.
Thanks.
pub led_blink
· dira[noparse][[/noparse]16] := 1
· dira[noparse][[/noparse]17] := 1
· dira[noparse][[/noparse]18] := 1
· repeat
··· outa[noparse][[/noparse]16] := 1
··· outa[noparse][[/noparse]17] := 0
··· outa[noparse][[/noparse]18] := 0
··· waitcnt(clkfreq + cnt)
··· outa[noparse][[/noparse]16] := 0
··· outa[noparse][[/noparse]17] := 1
··· outa[noparse][[/noparse]18] := 0
··· waitcnt(clkfreq + cnt)
··· outa[noparse][[/noparse]16] := 0
··· outa[noparse][[/noparse]17] := 0
··· outa[noparse][[/noparse]18] := 1
··· waitcnt(clkfreq + cnt)
··· outa[noparse][[/noparse]16] := 0
··· outa[noparse][[/noparse]17] := 1
··· outa[noparse][[/noparse]18] := 0
··· waitcnt(clkfreq + cnt)
·
OUTA[noparse][[/noparse]17]~ ' reset start := cnt ' start timer OUTA[noparse][[/noparse]17]~~ ' release reset waitpne(|< 16, |< 16, 0) ' wait for propeller to set pin low time := cnt - start ' end timer
It takes about 123637632 cycles at 80MHz which is 1.545 seconds. The amount of time was fluctuating a few hundred thousand cycles in either direction but the amount of time is not massive. The propeller that is resetting is also running at 80MHz. I also tried it without setting the clkmode (this it was running at about 12MHz), it took about 0.005 seconds less time (probably due to PLL settling time). Of course, this is all with a pull up on both P30 and P31 (due to other necessities I have on my circuit board).
So this doesn't help, but it confirms what Don M was seeing.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
"I'd keep it powered up with an RCSLOW clock and one cog sitting in a wait* waiting for an external pin to change state. Bringing things back up from there is a matter of milliseconds.
You could start all the cogs loading and then do the clock switch while they boot up. You should be able to go from ultra low power to full speed in less than 20ms (limited by PLL settling time)."