timer

Status
Not open for further replies.

jijita

New Member
when i write a value to timer ex:200 (4mhz oscillator)
then i wait for the overflow
how do i mesure the delay caused by this
 
In Mplab there is a stopwatch window, when simulator is enabled. Put a break point at where it is to start, and then one for the end. When you run it and it stops at the first, zero the counter. Now push run again and when it stops on the next break, the watch will show the time in cycles and secs.


Kent
 
You could toggle a pin when the Timer Overflows and hook up a scope and measure the frequency or you could calculate it out. If it is a PIC the clock is divided by 4 then through the pre-scaler then it counts the $FF(8 bit) less the value you loaded.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…