| ??? 12/04/02 10:42 Read: times |
#33738 - RE: Problem with reading timers |
I don't follow your explanation. main can't be in a loop ... do you mean there is a while(1) in main? How and when is Knipper called?
Do you have a simulator? Try following execution through with that to see what your code is doing. As you have written it, teller will be 0 (or whatever value the compiler chooses, you didn't initialise it) every time Knipper is called. That's part of your problem - teller is an uninitialised auto variable. You need: static teller = 0; now teller will maintain it's value between calls to Knipper() |



