??? 07/24/06 16:10 Read: times |
#120954 - clarifications Responding to: ???'s previous message |
Russell Bull said:
You have neglected to show us the initialisation code which could hold critical information, you have also not told us the frequency of the cpu - I gather this is 12MHz. What else does timer1 do? To isolate the problem, you need to get the code down to the bare minimum. What happens if you disable timer0? timer1? These routines could be stealing precious cpu time causing the timer2 code to miss interrupts. Divide and conquer is the name of the game.
thanx for your help sir.Yaa i am using a 12 MHz crystal. Timer 1 is just incrementing variable 'g'. explaination of variable g: int g;//a global variable this application is for input signal of time period 20 msec. 'g' helps us keep track of occurences of 2 consecutive zeros at interval of 5 msec,so that timer stops as input signal has become zero. If you have one timer doing 1mS and another timer doing 5mS, why not just use one timer at 1mS and execute the 5mS every 5 ticks? Ans: I had tried this with my lower resolution timers but separating the works in 2 timer interrupts made it run faster. Nyways i'll try it again with this timer also. |
Topic | Author | Date |
problem in timer with a least count of 1 millisec | 01/01/70 00:00 | |
Code as shown should work methinks | 01/01/70 00:00 | |
clarifications | 01/01/70 00:00 | |
atomicity | 01/01/70 00:00 | |
atomicity problem? | 01/01/70 00:00 | |
about atomicity | 01/01/70 00:00 | |
Back to basic | 01/01/70 00:00 | |
reply to vishal sinha | 01/01/70 00:00 | |
bible time | 01/01/70 00:00 | |
Hm ... | 01/01/70 00:00 | |
reply to Christoph Franck | 01/01/70 00:00 | |
totally imprecse | 01/01/70 00:00 | |
What is the size of the variables? | 01/01/70 00:00 | |
not enough info | 01/01/70 00:00 | |
other details about code | 01/01/70 00:00 | |
here you go again | 01/01/70 00:00 | |
yet questions more![]() | 01/01/70 00:00 |