Rifraf
- 4th December 2007, 03:12
Hi Forum,
I hope this is the right place to post. I am new to all this, I don't even have the compiler yet. I need to determine if I need Pro version to do what I want to do. I've written the psuedo-code, here's what i plan to do:
I have 3 things I am timing, that overlap and will be tested for 250ms < X < 900ms, Y<5000ms and Z < 1-30minutes.
My thought, to make use of PBC rather than spend the money on PBP was to not use timers, rather use timing variables and pauses. So, I thought I'd end each loop with a TimerInc routine that would pause 5-10ms increment each active timer by that amount.
My first question is this: The accuracy of this method is going to be dependent on the ratio of the loop runtime vs. the pause length. If the loop takes 1ms to run and I pause 5ms, I will be 20% off. If the loop takes 100uS, I'm only 2% off. I'm still new to the concept of the speed at which these controllers are running. I am expecting that the loop runtime will be more on the order of uS's. Obviously, the loop runtime is dependent on the number of instructions in the loop. But, What's the reality here? What's the best way to make a ballpark stab at how long a section of PBC code is going to run?
Second: In making the decision of PBC vs. PBP. Most of the programs I am going to write are this simple. If I am not needing to make special use of Timers, etc. Should I be fine with PBC? Would there be any compelling reason to spend the extra money on PBP???
Thanks much,
- Rif
I hope this is the right place to post. I am new to all this, I don't even have the compiler yet. I need to determine if I need Pro version to do what I want to do. I've written the psuedo-code, here's what i plan to do:
I have 3 things I am timing, that overlap and will be tested for 250ms < X < 900ms, Y<5000ms and Z < 1-30minutes.
My thought, to make use of PBC rather than spend the money on PBP was to not use timers, rather use timing variables and pauses. So, I thought I'd end each loop with a TimerInc routine that would pause 5-10ms increment each active timer by that amount.
My first question is this: The accuracy of this method is going to be dependent on the ratio of the loop runtime vs. the pause length. If the loop takes 1ms to run and I pause 5ms, I will be 20% off. If the loop takes 100uS, I'm only 2% off. I'm still new to the concept of the speed at which these controllers are running. I am expecting that the loop runtime will be more on the order of uS's. Obviously, the loop runtime is dependent on the number of instructions in the loop. But, What's the reality here? What's the best way to make a ballpark stab at how long a section of PBC code is going to run?
Second: In making the decision of PBC vs. PBP. Most of the programs I am going to write are this simple. If I am not needing to make special use of Timers, etc. Should I be fine with PBC? Would there be any compelling reason to spend the extra money on PBP???
Thanks much,
- Rif