Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Yes you can.
It depends on several things
1-The operation clock of your micro (as gose higher you get more precisson)
2-Timer interrupt features ()
3-Interrupt latency(As it gose lower you get more accuracy)
4-Prescaler (hold some effort of the SW)
Yes it is feasible u can build a accurate clock.
U need a 32 bit processor which can store the data words and u need to program your SW in such a way that the interrupts will not suspend the operation.
in case of sw hanging (the micro controller hangs for a while), how can overcome the difference between the sw time and the real clock(without reloading the current time).
Hi, On most PIC's you can use Timer 1 in oscillator mode with a 32 KHz Crystal this is what you should do. When you get an timer 1 overflow give an interrupt and serve this. Also use BOR and WDT to make sure you do not get hangup's in infinite loops. Check the PIC18F8722 (39646b.pdf) datasheet Example 13-1 for code that make Timer 1 an Real-Time Clock.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.