Searching \ for '[OT]: keep track of date without calendar chip' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=keep+track+date
Search entire site for: 'keep track of date without calendar chip'.

Exact match. Not showing close matches.
PICList Thread
'[OT]: keep track of date without calendar chip'
2002\10\19@130522 by John Waters

picon face
Hi All,

Can I use a microcontroller alone without any calendar chip to keep track of
the date? I want that my device should be able to set up its clock from a PC
through the COM once and it will know the DD/MM/YY HH/MM/SS at any time, is
it possible?

Thanks in advance!

John





_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband.
http://resourcecenter.msn.com/access/plans/freeactivation.asp

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\10\19@140848 by Robert Rolf

picon face
Sure. Just start up a timer interrupt to accumulate time
and NEVER turn off the micro. Add a supercap or small battery to
provide for battery change outs.

Lots of discussion on this list last year on how to get an accurate
timebase using error accumulator overflows.

Some PICs (16F87x)also support the use of a 32kHz crystal on certain
timer pins. You still have to keep the micro running, but your
timekeeping code becomes simpler.

Been there, done that, and found that a RTC chip like the DS1302
just makes a LOT more sense, if you can pursue that option. 3 pins (2 of
which you can share with other functions if you're clever) and a
energy source (MnO, Li or supercap) gets you a hassle free solution.

John Waters wrote:
{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\10\19@155735 by Peter L. Peres

picon face
On Sat, 19 Oct 2002, Robert Rolf wrote:

*>Been there, done that, and found that a RTC chip like the DS1302
*>just makes a LOT more sense, if you can pursue that option. 3 pins (2 of
*>which you can share with other functions if you're clever) and a
*>energy source (MnO, Li or supercap) gets you a hassle free solution.

Me too except I prefer to use a 12C508A as timekeeper (with 32kHz xtal).
It sends 600Baud TTL level RS232 data on a pin (using open drain drive to
avoid loading the supply). The setting is done using two buttons (time
honored shift & set) which can be wired to another cpu is necessary. The
timer runs in packed BCD. The 300Baud tx does most of the constant run
time timing ;-) ;-) Getting the years to work right took some work, but I
do not need years usually.

The tx format is HHMMSSDDMMYYYY in packed BCD (7 characters per second).

Some RTC chips (from Seiko etc) operate like this but use 3 wire format.
They also use 2 set buttons as above.

Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\10\19@215951 by Robert Rolf

picon face
"Peter L. Peres" wrote:
>
> On Sat, 19 Oct 2002, Robert Rolf wrote:
>
> *>Been there, done that, and found that a RTC chip like the DS1302
> *>just makes a LOT more sense, if you can pursue that option. 3 pins (2 of
> *>which you can share with other functions if you're clever) and a
> *>energy source (MnO, Li or supercap) gets you a hassle free solution.
>
> Me too except I prefer to use a 12C508A as timekeeper (with 32kHz xtal).

But will it run for months unpowered? What current did you get down to?
The DS1302Z osc draws around 300nA (so low I had a bugger of
a time measuring it) which means you get nearly shelf life
with a tiny lithium and months on a rechargable MnO battery (3v).

And the DS1302 also has 31 bytes of RAM that can be used to store
system state and data.

Whatever works for you given your constraints...

R

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\10\20@143415 by Peter L. Peres

picon face
On Sat, 19 Oct 2002, Robert Rolf wrote:

*>"Peter L. Peres" wrote:
*>>
*>> On Sat, 19 Oct 2002, Robert Rolf wrote:
*>>
*>> *>Been there, done that, and found that a RTC chip like the DS1302
*>> *>just makes a LOT more sense, if you can pursue that option. 3 pins (2 of
*>> *>which you can share with other functions if you're clever) and a
*>> *>energy source (MnO, Li or supercap) gets you a hassle free solution.
*>>
*>> Me too except I prefer to use a 12C508A as timekeeper (with 32kHz xtal).
*>
*>But will it run for months unpowered? What current did you get down to?
*>The DS1302Z osc draws around 300nA (so low I had a bugger of
*>a time measuring it) which means you get nearly shelf life
*>with a tiny lithium and months on a rechargable MnO battery (3v).
*>
*>And the DS1302 also has 31 bytes of RAM that can be used to store
*>system state and data.

I got it to under 30uA I think with WDT on (I have to look) on a 3V Li
battery.

The 12C508 also has a few bytes of RAM ;-) ;-) (communication in both
directions is a problem though).

As to time, developing the softare took the usual amount of time, but once
it's done it's done. It was not particularly hard, I had experience with
constant run time code from writing code for 16C54s before.

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\10\20@192314 by mike

flavicon
face
On Sun, 20 Oct 2002 19:57:31 +0200, you wrote:

{Quote hidden}

..and most of that is the Watchdog..... I'd say an external micropower
brownout chip would be more useful than the WDT in this sort of
application.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\10\20@201339 by Peter L. Peres

picon face
On Mon, 21 Oct 2002, Mike Harrison wrote:

*>..and most of that is the Watchdog..... I'd say an external micropower
*>brownout chip would be more useful than the WDT in this sort of
*>application.

My datasheet says up to 1/3 of the power is the watchdog. I am not using
external reset or brownout, the wdt is the only thing that recovers the
cpu from la-la land.

At 30uA a 250mAh lithium battery will keep it running for over a year. A
supercap will run it for a week (with Vstart = 5V, Vend = 2.5V, 0.22F I
think).

Having very low power mcus probably would make a lot more sense if smaller
batteries were available and inexpensive ...

Peter

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\10\21@060714 by mike

flavicon
face
On Mon, 21 Oct 2002 02:09:49 +0200, you wrote:

>On Mon, 21 Oct 2002, Mike Harrison wrote:
>
>*>..and most of that is the Watchdog..... I'd say an external micropower
>*>brownout chip would be more useful than the WDT in this sort of
>*>application.
>
>My datasheet says up to 1/3 of the power is the watchdog. I am not using
>external reset or brownout, the wdt is the only thing that recovers the
>cpu from la-la land.

WDT will usually NOT recover from brownout. My biggest complaint about
the 8 pin devices is that you often need to waste a pin for an
external reset - an onboard micropower brownout detector would make
these chips SO much nicer!
.
>Having very low power mcus probably would make a lot more sense if smaller
>batteries were available and inexpensive ...
How small/cheap do you want.... alkaline button-cells are a few cents,
and lithiums can be got down to about 1220

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\10\21@140327 by Peter L. Peres

picon face
On Mon, 21 Oct 2002, Mike Harrison wrote:

*>>My datasheet says up to 1/3 of the power is the watchdog. I am not using
*>>external reset or brownout, the wdt is the only thing that recovers the
*>>cpu from la-la land.
*>
*>WDT will usually NOT recover from brownout. My biggest complaint about
*>the 8 pin devices is that you often need to waste a pin for an
*>external reset - an onboard micropower brownout detector would make
*>these chips SO much nicer!

My experience is different. WDT does recover from brownout for me. This
assumes that the clrwdt instruction(s) are placed cleverly. I rewrite the
OPTION and TRIS registers as a part of the main loop too.

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...