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.

Time measuring with 16f877

Status
Not open for further replies.

PIC2PIC

New Member
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?
 
hi,
Use Timer1 for your 'timed' interrupt, not the WD timer.

Whats the crystal frequency.?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top