Continue to Site

Welcome to EDAboard.com

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.

Can you build an accurate software real time clock?

Status
Not open for further replies.

ragabs

Full Member level 1
Joined
Jun 28, 2005
Messages
96
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,111
dear all

is it feasible to build accurate
sw real time clock ?

thanx in advance
 

Re: sw real time clock

Yes, You only need a processor wich offers a lowcurrent low frequency 32...Khz like a PIC16F88 or MSP430 !.

Paul.
 

Re: sw real time clock

7abeeby

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)

keep in ta2sh :D ;)
Salam
Hossam Alzomor
www.i-g.com

:D:D
 

Re: sw real time clock

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.

Cheers
Gowtham
 

Re: sw real time clock

ok thanx all

but i think now i face another problem that

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).

thanx in advance
 

Re: sw real time clock

Hi, Use an interrupt and an reloadable timer or CCP module if its a PIC. SW hangups should not happen :).
 

Re: sw real time clock

thanx PaulHolland
do u mean using the hw module of the watchdog
 

Re: sw real time clock

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.

:).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top