Searching \ for '[PIC]: a "clock" ({hours,minutes}) with a PIC' 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/microchip/time.htm?key=clock
Search entire site for: 'a "clock" ({hours,minutes}) with a PIC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: a "clock" ({hours,minutes}) with a PIC'
2001\01\19@110807 by Andrea Aizza

flavicon
face
Hi,

I am a beginner of PIC designing. I have to include a time reference in my design. This means I would like to implement a clock which gives me the time i.e. {hours,minutes}. An idea is to use the an adequate clock signal and use it to increment a counter inside the PIC; maybe this is a stupid idea. Obviously this means the PIC should be always switched on, with the consequent power consumption. Are there more efficient solutions in terms of power consumption? Is it there a *COMMON* way to solve this problem?

Thanks for your help,

Andrea.


--------------------------------------------------------------- Ing. Andrea AIZZA
---------------------------------------------------------------
Tender S.p.A. Smart Card's & Rapid Prototyping

Area Science Park e-mail: Andrea.Aizza@tender-online.com
s.s. 14 Km. 163,5 web=A0=A0 : http://www.tender-online.com
Loc. Basovizza phone : +39 40 375 7900
I-34012 - Trieste fax : +39 40 375 7902
---------------------------------------------------------------
-- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.

2001\01\19@114031 by M. Adam Davis

flavicon
face
If you use a pic with interrupts (such as the f84) then you can do a few
things:

Use the external source to pulse the timer input RA4, and set that up so
the timer is incremented each time a pulse comes in (or use the prescaler
if you want it incremented less)

Set the counter to generate an interupt on overflow, set the interrupt to
255, and go to sleep.  The next pulse will set the timer to 0, interrupt,
wake the processor, and you can do whatever you need to do before going
back to sleep.  This will result in the lowest power consumption in a
pic.  Of course, if you need to update a display, or otherwise you'll have
to work out some other arrangement.

-Adam

Andrea Aizza wrote:
{Quote hidden}

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


2001\01\19@163755 by Germain Morbe

flavicon
face
Hello Andrea,

without investing in additional hardware your idea is the usual way and not
stupid at all.
Your PIC dont need to be allways active if you use a type that supports
INTERRUPTS. you can use a 16C61 for example because it has a second
oscillator circuit which can be running while the PIC itself is in SLEEP
mode. Now suppose you connect a 32.768kHz crystal to the second oscillator
pins. Then you would set up the prescaler and timer values to overflow after
32768 counts. You would further set the PIC to WAKEUP on timer overflow INT
then go to SLEEP.
Now, each time your PIC wakes up from sleep you know that exactly 1 second
is over.
Then your INT routine would increment a register called SECs, if the value
reaches 60 then reset it to zero and increment the register called MINs and
so on.

Germain Morbe

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


2001\01\22@014607 by Vasile Surducan

flavicon
face
There are two or three application notes at Microchip.
Also you may visit my x84 clock collection at:
http://www.geocities.com/vsurducan/pic.htm
Vasile


On Fri, 19 Jan 2001, Andrea Aizza 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



'[PIC]: a "clock" ({hours,minutes}) with a PIC'
2001\02\04@222142 by Gennette, Bruce
flavicon
face
There are cheap, 3 pin devices designed *EXACTLY* for this purpose called
real-time-clocks.  With just a tiny trickle of current they keep an accurate
count of seconds, etc. You communicate with them over a single wire (and the
0V 'common' line).  Your uC sends a command out to the device, then switches
from output to input and reads in the response from the real-time-clock.
Temperature, pressure, acceleration, etc devices are available in the same
format.  A number of devices can be connected in parallel to the '1-wire',
each only responding when its unique ID code is in the command sent by the
uC.

You can configure the uC to sleep until an external event wakes it up, or
you can get the uC to wake up regularly to query the real-time-clock to see
if it is time to actually stay awake for more than a few ms.

bye.

> {Original Message removed}

2001\02\04@223220 by David VanHorn

flavicon
face
At 02:16 PM 2/5/01 +1100, you wrote:
>There are cheap, 3 pin devices designed *EXACTLY* for this purpose called
>real-time-clocks.


Where did you find a three pin RTC??
(And what's it's timebase?)



--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamKILLspammitvma.mit.edu with SET PICList DIGEST in the body


2001\02\05@183422 by Byron A Jeff

face picon face
>
> At 02:16 PM 2/5/01 +1100, you wrote:
> >There are cheap, 3 pin devices designed *EXACTLY* for this purpose called
> >real-time-clocks.
>
>
> Where did you find a three pin RTC??
> (And what's it's timebase?)

Another note.

There are several Microchip application notes that describes how to get RTC
functionality by adding a 32.768 KhZ crystal to timer 1 on the mid level PIC.
2 second resoultion is trivial and others can be generated with a bit of
software work.

BAJ

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu


2001\02\05@201621 by Tony Nixon

flavicon
picon face
I've just put together a clock project that I am adding to my
projects.pdf file. It is much the same as the Microchip app note and
circuit, but uses the 25/50 Hz mains frequency as the time base.

Here is the source code and circuit gif.

http://www.picnpoke.com/projects/clk.zip

--
Best regards

Tony

mICro's
http://www.picnpoke.com
EraseMEsalesspam_OUTspamTakeThisOuTpicnpoke.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu


2001\02\06@005624 by jhancock

flavicon
face
Bruce, you mentioned 3 pin real-time clocks and other functions.  Please
give manufacturer, and part designation and/or a web site describing same.
I did not see this info posted on [PIC].

Thanks

Jess Hancock

{Original Message removed}

2001\02\06@173502 by Tony Nixon

flavicon
picon face
I tossed my old mail out and can't find who started this thread but, I
just uploaded the simple clock project which has two source codes. One
uses TMR0 via interrupt to keep time, and the other uses the mains
frequency. (more accurate)

I also included a PDF file with a circuit diagram and an easy to make
PCB design which will work with both methods with no modification.

http://www.picnpoke.com/projects/clk.zip

--
Best regards

Tony

mICro's
http://www.picnpoke.com
@spam@salesKILLspamspampicnpoke.com

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


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