Forums

Implementing Real Time Clock in the ATmega128

Started by mkoswatte November 12, 2008
Hello I am new to Atmel
I am trying to make a data collecting device and send data over GPRS
but problem is I need to integrate real time clock calender in the device
to gather information when the data is collected?

There are two options
1.Use Atmega128 timer/clock
2.Use separate chip with clock calender

But i need to have separate battery powered system to keep the time up to
date 
so what is the most soot-able way to keep accurate clock without any error
and low power consumption from above two?

Please reply with at least short answer if you know any!
Thanks!

Regard
Manula





mkoswatte escreveu:
> Hello I am new to Atmel > I am trying to make a data collecting device and send data over GPRS > but problem is I need to integrate real time clock calender in the device > to gather information when the data is collected? > > There are two options > 1.Use Atmega128 timer/clock > 2.Use separate chip with clock calender >
If you're going to use GPRS can't you get the time from the Operator?

mkoswatte wrote:

> Hello I am new to Atmel > I am trying to make a data collecting device and send data over GPRS > but problem is I need to integrate real time clock calender in the device > to gather information when the data is collected? > > There are two options > 1.Use Atmega128 timer/clock > 2.Use separate chip with clock calender > > But i need to have separate battery powered system to keep the time up to > date so what is the most soot-able way to keep accurate clock without any error > and low power consumption from above two?
If you are planning to keep the device in the low power sleep mode for a long time, I wouldn't advise using the internal RTC of Atmega128. The internal RTC consumption is somewhat 100 times higher than that of a typical RTC chip. With the internal RTC, it wouldn't be practical to operate from a coin cell. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
"Vladimir Vassilevsky" <antispam_bogus@hotmail.com> wrote in message 
news:PJFSk.6322$x%.5195@nlpi070.nbdc.sbc.com...
> > > mkoswatte wrote: > >> Hello I am new to Atmel >> I am trying to make a data collecting device and send data over GPRS >> but problem is I need to integrate real time clock calender in the device >> to gather information when the data is collected? >> >> There are two options >> 1.Use Atmega128 timer/clock >> 2.Use separate chip with clock calender >> >> But i need to have separate battery powered system to keep the time up to >> date so what is the most soot-able way to keep accurate clock without >> any error >> and low power consumption from above two? > > If you are planning to keep the device in the low power sleep mode for a > long time, I wouldn't advise using the internal RTC of Atmega128. The > internal RTC consumption is somewhat 100 times higher than that of a > typical RTC chip. With the internal RTC, it wouldn't be practical to > operate from a coin cell. > > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultant > http://www.abvolt.com > >
Vlad is right about the ATmega128 but the new parts are a bit better - the Xmega series draws 650nA in RTC mode (average will be higher since the processor will need to wake to service the clock). If you are new to Atmel it might make sense to use one of the more modern parts (but do check availability before you are committed to it !). Michael Kellett
On Wed, 12 Nov 2008 12:34:48 -0600, mkoswatte <mkoswatte@yahoo.com> wrote:
> Hello I am new to Atmel > I am trying to make a data collecting device and send data over GPRS > but problem is I need to integrate real time clock calender in the device > to gather information when the data is collected? > > There are two options > 1.Use Atmega128 timer/clock > 2.Use separate chip with clock calender > > But i need to have separate battery powered system to keep the time up to > date > so what is the most soot-able way to keep accurate clock without any error > and low power consumption from above two?
The DS1307 from Maxim/Dallas. It keeps a leap-year-compensated calendar-clock, provides a small amount of NVRAM, and will automatically switch to a backup power source (e.g. 3V coin cell) when its primary power drops off. http://www.maxim-ic.com/ There are other DS130x chips with different feature sets. One caveat: don't leave the backup power pin unconnected. <grin!> Enjoy... -- Recessions are the market's way of teaching Americans Economics. -- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)
>If you're going to use GPRS can't you get the time from the Operator? >
Oh Thanks Machan! for reminding me that.I have totally forget it do you think it is possible always to get the correct time from the operator? is it reliable way of tracking time?
> > >mkoswatte wrote: > >> Hello I am new to Atmel >> I am trying to make a data collecting device and send data over GPRS >> but problem is I need to integrate real time clock calender in the
device
>> to gather information when the data is collected? >> >> There are two options >> 1.Use Atmega128 timer/clock >> 2.Use separate chip with clock calender >> >> But i need to have separate battery powered system to keep the time up
to
>> date so what is the most soot-able way to keep accurate clock without
any error
>> and low power consumption from above two? > >If you are planning to keep the device in the low power sleep mode for a
>long time, I wouldn't advise using the internal RTC of Atmega128. The >internal RTC consumption is somewhat 100 times higher than that of a >typical RTC chip. With the internal RTC, it wouldn't be practical to >operate from a coin cell. > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com > > >
Thanks Vladimir! I also want to supply power from a coin cell I will try a RTC chip can you tell me what should be the most sooitable features(Interfaces I2C?) that the chip should have to easily communicate with Atmega 64/128.
On Sat, 15 Nov 2008 04:29:42 -0600, "mkoswatte" <mkoswatte@yahoo.com>
wrote:

> >>If you're going to use GPRS can't you get the time from the Operator? >> >Oh Thanks Machan! for reminding me that.I have totally forget it > do you think it is possible always to get the correct time from the >operator? is it reliable way of tracking time?
This is usable as long as you can accept a second or two jitter in the timing. For instance NTP assumes that the propagation delay is the same in both directions, which necessarily is not the case with GPRS. Paul
>On Sat, 15 Nov 2008 04:29:42 -0600, "mkoswatte" <mkoswatte@yahoo.com> >wrote: > >> >>>If you're going to use GPRS can't you get the time from the Operator? >>> >>Oh Thanks Machan! for reminding me that.I have totally forget it >> do you think it is possible always to get the correct time from the >>operator? is it reliable way of tracking time? > >This is usable as long as you can accept a second or two jitter in the >timing. > >For instance NTP assumes that the propagation delay is the same in >both directions, which necessarily is not the case with GPRS. > >Paul > > >
Thanks Paul!Your suggestion will be very very good! will tell what is happening next! Regard Manula
you may use DS1302/1307 or similar chip from maxim and have a backup
battery with it.there are some rtc chips with tricle charger witch can be
used to recharge your battery
Regards
Manula

>Hello I am new to Atmel >I am trying to make a data collecting device and send data over GPRS >but problem is I need to integrate real time clock calender in the device >to gather information when the data is collected? > >There are two options >1.Use Atmega128 timer/clock >2.Use separate chip with clock calender > >But i need to have separate battery powered system to keep the time up to >date >so what is the most soot-able way to keep accurate clock without any
error
>and low power consumption from above two? > >Please reply with at least short answer if you know any! >Thanks! > >Regard >Manula > > > > > >
--------------------------------------- Posted through http://www.EmbeddedRelated.com