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.

real time clock vs. pic timer1 module

Status
Not open for further replies.

olemp

Full Member level 1
Joined
Jul 18, 2004
Messages
96
Helped
5
Reputation
10
Reaction score
3
Trophy points
1,288
Location
turkiye
Activity points
1,043
pic real time clock

hi.
in clock application (using pic mcu+lcd) what we should use to achieve precision on time...
is timer1 enough(with 32.768 khz osc) or real time ic necessary???
is there any difference about precision???
 

pic rtc

If you use a real time clock it is going to need an external oscilator, a 32khz cristal.
But i recomend to use a Compensated Crystal Oscillator like the DS32kHz from Maxim.
 

pic timer1

I think it's bettter if u use a RTC ic ds1307 because it's counts seconds, minutes, hours, date of the month, month, day of the week, and year with
leap year compensation valid up to 2100
 
rtc pic

Salam,

If this for clock project (Hobby project), yes it's enough to use the internal timer of uC with 32khz Crystal

But it's better to use RTC Clock like DS1302 (3 Wire serial) or DS1307 (I2C Serial)

Look for this link

F84 Miniature Real-Time Controller
**broken link removed**

Bye
 

real time clock pic

thanks everybody.. just i want to compare them in precision criteria.......
obviously rtc ic has more advenced features but just for a clock application (which need precision) it looks waste ,isn't it??..
 

pic timer module

Practically you can toss a coin to solve this dilema, unless you need very, very accurate time source. Even the DS32kHzS from Dallas will give you something like +/-1minute per year. If you are happy with a couple of second/week than any cristal quarz based system will do; if you are after "absolute" time than get this trough GPS or 75kHz long wave (in Europe only) transmission.
 

timer1

olemp said:
just i want to compare them in precision criteria.......
obviously rtc ic has more advenced features but just for a clock application (which need precision) it looks waste ,isn't it??..
A waste in term of $$$?

BQ3285
RTC IC with 114x8 NVSRAM
USD2.10

PIC16F84A
PIC microcontroller
USD3.42
 

pic with rtc

it can be done with a 16f628 + lcd + rtc + ds32khz
Very cheap!!!
 

timer1 pic

About 4 years back, while building one of my digital alarm clock using microcontroller, even I use to think that using RTC chip is a waste when it can be done using precised timer interrupts . But when I actually did it using only uC, I found the reason why we should use "Real" time clocks. My only-uC based clock used to loose 3 seconds daily. It means 90 seconds per month! Thats very bad in terms of accuracy. The interrupt overhead was causing this error because uC cannot jump to ISR as soon as interrupt occurs. It has to first finish its current instructon, then jump to ISR, update the timings and return back. This is where micro-second errors come up and they add up to 3 seconds per day!

So using external RTCs is must because it has only one job to do and that is time keeping. Whereas your uC has to do a lot of other jobs which makes it forget that it has to keep the time too.
 

pic timer1 external

CMOS, your time drift may have been caused by frequency error of your microprocessor's crystal oscillator (if that is what you were using). Three seconds per day is 35ppm. A typical inexpensive crystal oscillator is rated at plus or minus 100ppm.
 

pic timer1 32khz

echo47 said:
CMOS, your time drift may have been caused by frequency error of your microprocessor's crystal oscillator (if that is what you were using). Three seconds per day is 35ppm. A typical inexpensive crystal oscillator is rated at plus or minus 100ppm.
Yes even that may be the cause of error. I used 89C2051 with 11.0592MHz crystal.
Now I don't use this method of time keeping. DS1307 works great for all applications and is not that costly.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top