Hi
I made a device that counts the time, something like a clock. And I use Watch Dog Timer to count seconds.But the problem is accuracy, i.e. for every minute my clock is fast about 1 second.
I use PIC 16f877.
So I have 2 questions:
1. Is there a better and more accurate way to count seconds or smaler fractions of seconds then to use WDT
2. In assembly code I try to improve accuracy in every minute by substracting one second after every 61
"Seconds" ,but strange thing happen. I regulate memory bank for each register, but in a
dissassembly listing in MPLAB is shown that the address of the memory register that I use is some other bank
diferent then I set, and that means some other memory register, and I can't do nothing to change that .
What could be reason for this?
I made a device that counts the time, something like a clock. And I use Watch Dog Timer to count seconds.But the problem is accuracy, i.e. for every minute my clock is fast about 1 second.
I use PIC 16f877.
So I have 2 questions:
1. Is there a better and more accurate way to count seconds or smaler fractions of seconds then to use WDT
2. In assembly code I try to improve accuracy in every minute by substracting one second after every 61
"Seconds" ,but strange thing happen. I regulate memory bank for each register, but in a
dissassembly listing in MPLAB is shown that the address of the memory register that I use is some other bank
diferent then I set, and that means some other memory register, and I can't do nothing to change that .
What could be reason for this?