Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top