IPB

Welcome Guest ( Log In | Register )

> Get The Timing Based On Time
ner
post Dec 15 2007, 12:34 PM
Post #1


Newbrie


Group: EstablishedMember
Posts: 6
Joined: 29-November 07
Member No.: 3,922



hallo...
how do i measure the eact timing on my code using boostc?
even it have speed tester, but it dont show in time base....
and how do i measure my the time of my desired code?
update Picpack 3.0 Released
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
fred
post Dec 16 2007, 11:30 PM
Post #2


Enthusiast
**

Group: EstablishedMember
Posts: 100
Joined: 1-December 06
From: Netherlands
Member No.: 2,116



set breakpoints in the debugger at the beginning and end of the code you want to evaluate.
in the debugger you can see the amount of ticks. so when you let it run from breakpoint to breakpoint you are able to see how manny ticks it took. If I don't oversee something here ( rolleyes.gif ) this should be a working method to determine the exact time it takes to run that peace of code.....
Go to the top of the page
 
+Quote Post
Reynard
post Dec 17 2007, 05:44 PM
Post #3


Super Enthusiast
***

Group: EstablishedMember
Posts: 429
Joined: 24-October 07
From: Scotland
Member No.: 3,861



QUOTE (fred @ Dec 16 2007, 11:30 PM) *
set breakpoints in the debugger at the beginning and end of the code you want to evaluate.
in the debugger you can see the amount of ticks. so when you let it run from breakpoint to breakpoint you are able to see how manny ticks it took. If I don't oversee something here ( rolleyes.gif ) this should be a working method to determine the exact time it takes to run that peace of code.....


A tick appears to be an oscillator cycle. If you step through a 1 cycle instruction it will increment the tick count by 4. A 4MHz xtal will give 1us instruction cycle time.

The tick count will change to values in 'kilo' after a while i.e. 10k etc. which cannot be reset to zero.

If you install BoostC within MPLab (Microchip IDE) you can use its watchdog feature measure in real time.

Cheers

Reynard
Go to the top of the page
 
+Quote Post
Reynard
post Dec 17 2007, 05:47 PM
Post #4


Super Enthusiast
***

Group: EstablishedMember
Posts: 429
Joined: 24-October 07
From: Scotland
Member No.: 3,861



QUOTE (Reynard @ Dec 17 2007, 05:44 PM) *
QUOTE (fred @ Dec 16 2007, 11:30 PM) *
set breakpoints in the debugger at the beginning and end of the code you want to evaluate.
in the debugger you can see the amount of ticks. so when you let it run from breakpoint to breakpoint you are able to see how manny ticks it took. If I don't oversee something here ( rolleyes.gif ) this should be a working method to determine the exact time it takes to run that peace of code.....


A tick appears to be an oscillator cycle. If you step through a 1 cycle instruction it will increment the tick count by 4. A 4MHz xtal will give 1us instruction cycle time.

The tick count will change to values in 'kilo' after a while i.e. 10k etc. which cannot be reset to zero.

If you install BoostC within MPLab (Microchip IDE) you can use its watchdog feature measure in real time.

Cheers

Reynard


Doh! Did I say watchdog feature ? read that as "Stopwatch feature to measure in real time."

Reynard
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 3rd September 2010 - 02:47 PM