I am not familiar with "cadd code" If you intended to say "copy code" then yes, I did copy some code in an effort to learn how it works.
Pause does not do anything for me, I understand pause and the limitations of it. The do loop is not to add additional time, it was to see if giving the PIC another task within the timer would change the time which it did, but I don't understand why. This entire piece of code is nothing but to work with the timer and understand it. There is no purpose for it other than that. I am not trying to achieve a goal of timing one minute or one minute and ten seconds, I am only trying to learn exactly how the timers work.
At the end of the day I do want to use a timer interrupt for the project and there are many examples of code here. I have struggled in part because every example I have found has the code buried in code for buttons, LCDs, etc. I could not find a simple step 1, step 2, step 3 example that made sense to me. So, I decided to figure it out one step at a time. Step one was to figure out the timers and registers associated with the timers. The code I found on instructables.com was perfect for that and brought me to where I am now. However, it was my understanding that the timer should be ticking away almost without regard to the other things the processor is doing. I think my simple test indicates that something else is going on that I cannot wrap my head around. I don't think it does me any good to copy code from other timer projects without the understanding of how it works (or doesn't). If somebody could tell me where my thought process is wrong in this timer example I would be very grateful.





Bookmarks