Searching \ for '[PIC] QQ: Accurate clock w/o T1OSI/T1OSO?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.org/techref/microchip/time.htm?key=clock
Search entire site for: 'QQ: Accurate clock w/o T1OSI/T1OSO?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] QQ: Accurate clock w/o T1OSI/T1OSO?'
2012\02\16@000056 by PICdude

flavicon
face
I am about to order a proto board for a product but my customer wants  a digital clock feature added at the last minute (surprise!).  It's  setup for a 16F883, but I'll be migrating the code to a 18F24K22 soon.    The clock will have to be setup for low-power sleep operation,  waking periodically keep accurate time.

Problem: T1OSI/T1OSO is already used (all of PortC drives display  segments), and shuffling what's already on those pins to other  ports/pins creates other confusion.

PIC is currently running on the internal OSC at 8Mhz, and RA7/CLKIN is  available, but external/monolithic 32.768khz oscillators are pricey.

What I'm not clear on, is that if I run the PIC from an external  oscillator (say 12Mhz, 20ppm crystal) instead, can I use that  instruction clock to wake the PIC periodically?  The Timer1 diagram  (figure 6-1 on the 16F883 datasheet) suggests I can drive Timer1 from  the instruction clock/4, and get the same interrupts, but I'm not  clear on the process of running the PIC simultaneously from this  clock.  I don't think it should matter, but I feel like I'm missing  something.

Or is there some simpler method to do this?

Cheers,
-Neil.

2012\02\16@035344 by IVP

face picon face
> Or is there some simpler method to do this?

For lowest power I use a clock module as an interrupt source

http://home.clear.net.nz/pages/joecolquitt/lowpower.html

Typically I'll see 70-80nA consumption for PIC + clock

Accuracy is a few pp

2012\02\16@043324 by peter green

flavicon
face
PICdude wrote:
> What I'm not clear on, is that if I run the PIC from an external  
> oscillator (say 12Mhz, 20ppm crystal) instead, can I use that  
> instruction clock to wake the PIC periodically?
You can but you will have to use "idle" mode rather than "sleep" mode.
Sleep mode disables the main clock while idle mode doesn't. I dunno
if the power consumption in idle mode will be acceptable to you.

> Or is there some simpler method to do this?
>   Have you considered simply using a seperate RTC chip to track the time

2012\02\16@045505 by IVP

face picon face
> Have you considered simply using a seperate RTC chip to
> track the time?

There are several accurate low-power I2C/SPI RTC ICs

eg http://www.maxim-ic.com/products/timers/ds3234.cfm

@ Mouser http://nz.mouser.com/Search/Refine.aspx?Keyword=DS3234

(re-directed to NZ site - NZ$1 = US$0.82.6

2012\02\16@052502 by alan.b.pearce

face picon face
> > Have you considered simply using a seperate RTC chip to track the
> > time?
>
> There are several accurate low-power I2C/SPI RTC ICs
>
> eg www.maxim-ic.com/products/timers/ds3234.cfm
>
I believe Microchip has one now too.


-- Scanned by iCritical.

2012\02\16@054215 by Jan-Erik Soderholm

face picon face
alan.b.pearce@stfc.ac.uk wrote 2012-02-16 11:23:
>>> Have you considered simply using a seperate RTC chip to track the
>>> time?
>>
>> There are several accurate low-power I2C/SPI RTC ICs
>>
>> eg www.maxim-ic.com/products/timers/ds3234.cfm
>>
>
> I believe Microchip has one now too.
>
>

Probably:

http://www.microchip.com/pagehandler/en-us/technology/realtimeclock/home.htm

2012\02\16@060134 by IVP

face picon face

> http://www.microchip.com/pagehandler/en-us/technology/realtimeclock/home.html

MCP79410/MCP795 not bad pricing for a couple to go in the parts box

2012\02\16@075051 by PICdude

flavicon
face
Glad I asked, cause I forgot that the primary oscillator is disabled  during sleep.  The 16F883 does not have an IDLE mode, but it seems the  18F (which I'll be moving to eventually) does, and that when I'll need  this clock feature.

Those external RTC's are generally expensive, though now I see some  (even from our own Microchip) that are a bit of a buck each.  Prob  here is that these use I2C, and I'll either spend a lot of development  time to bit-bang I2C, or I'm faced with the same problem of needing a  couple Port-C pins to use the I2C peripheral.  Perhaps I can find a  small, low-cost RTC that just gives me an interrupt every second.

This is a very low-volume project (couple dozen units), so I'm  cringing at any significant development.  It's a spin-off of something  else I've done so most of the code is already developed, and I'd  prefer not to invest too much in coding changes for now.  Adding a  secondary oscillator with watch crystal would be simple.  Bit-banging  will take up much time debugging etc (past experience).

Cheers,
-Neil.



Quoting peter green <spam_OUTplugwashTakeThisOuTspamp10link.net>:

{Quote hidden}

>

2012\02\16@081707 by PICdude

flavicon
face
$8 ea (as I only need a couple dozen) is steep!  And these are quite  large.  However, following that thought I found others like these...

http://search.digikey.com/us/en/products/MCP7940N-I%2FMS/MCP7940N-I%2FMS-ND/2651353

http://search.digikey.com/us/en/products/S-35390A-J8T1G/728-1006-1-ND/1628413

The latter appears to have a periodic interrupt feature that perhaps I  can use to drive the INT0 pin.  Need to read through the (56-page!)  datasheet though.

Cheers,
-Neil.


Quoting IVP <.....joecolquittKILLspamspam@spam@clear.net.nz>:

>> Have you considered simply using a seperate RTC chip to
>> track the time?
>
> There are several accurate low-power I2C/SPI RTC ICs
>
> eg http://www.maxim-ic.com/products/timers/ds3234.cfm
>
> @ Mouser http://nz.mouser.com/Search/Refine.aspx?Keyword=DS3234
>
> (re-directed to NZ site - NZ$1 = US$0.82.6)
>

2012\02\16@083106 by PICdude

flavicon
face
(1) Rethinking the RTC options.  Since these RTC's require a crystal  anyway, it would prob make more sense for me to use a second PIC with  my own RTC implemented in it (should be easy), which generates  1-second pulses to my primary PIC's INT0 pin.  12F609's have a  secondary oscillator for a watch crystal, or I can use a  higher-precision primary crystal oscillator with a 10F perhaps.  Cost  should be less and I'm not relying on some product that may be  obsoleted in the near future.

(2) the 18F24k22 has a Timer-3 with an external T3CKI input that I can  move to PortB (rather than PortC).  I'm not clear yet if this can be  used with a watch crystal though, or if it requires an external  monolithic oscillator.  Anyone know?

Cheers,
-Neil.



Quoting PICdude <picdude3spamKILLspamnarwani.org>:

{Quote hidden}

>> -

2012\02\16@085035 by alan.b.pearce

face picon face
> (1) Rethinking the RTC options.  Since these RTC's require a crystal anyway, it
> would prob make more sense for me to use a second PIC with my own RTC implemented in
> it (should be easy), which generates 1-second pulses to my primary PIC's INT0 pin.
> 12F609's have a secondary oscillator for a watch crystal, or I can use a higher-
> precision primary crystal oscillator with a 10F perhaps.  Cost should be less and
> I'm not relying on some product that may be obsoleted in the near future.

Do the 10Fs have external crystals? I thought they all used internal oscillators.


-- Scanned by iCritical.

2012\02\16@095310 by Charles Craft

picon face

>> I believe Microchip has one now too.
>>
>>
> Probably:
>
> www.microchip.com/pagehandler/en-us/technology/realtimeclock/home.html
What are the specs for a CR3020 battery

2012\02\16@102628 by Jan-Erik Soderholm

face picon face
Charles Craft wrote 2012-02-16 15:53:
>
>>> I believe Microchip has one now too.
>>>
>>>
>> Probably:
>>
>> www.microchip.com/pagehandler/en-us/technology/realtimeclock/home..html
> What are the specs for a CR3020 battery?

What specific "specs"?
Capacity (from some web source) 220 mAh.
http://wiki.answers.com/Q/What_is_the_difference_between_cr2025_and_cr2032_batteries

Size I don't know... :-

2012\02\16@104033 by alan.b.pearce
face picon face
> > What are the specs for a CR3020 battery?
>
> What specific "specs"?
> Capacity (from some web source) 220 mAh.
> wiki.answers.com/Q/What_is_the_difference_between_cr2025_and_cr2032_batteries
>
> Size I don't know... :-)

The physical size of the battery is given in its model number - 20mm dia x 3.2mm thick -- Scanned by iCritical.

2012\02\16@140856 by PICdude

flavicon
face
Did this veer off my original question?  My app will need to be low  power, but will be powered off a car battery.  Yes, the regulator is  the bigger part of the power consumption, but the sleep mode is  important here.

Cheers,
-Neil.


Quoting Charles Craft <EraseMEchuckseaspam_OUTspamTakeThisOuTmindspring.com>:

>
>>> I believe Microchip has one now too.
>>>
>>>
>> Probably:
>>
>> www.microchip.com/pagehandler/en-us/technology/realtimeclock/home..html
> What are the specs for a CR3020 battery?
>

2012\02\16@201254 by IVP

face picon face
> (1) Rethinking the RTC options.  Since these RTC's require a crystal

Some have embedded crystals and the frequency can be very finely
tuned. Consider that 1Hz off on a 32768Hz crystal is 16 minutes per
year, and dedicated ICs are a magnitude or more lowe

2012\02\16@203227 by Charles Craft

picon face
If you follow the Microchip link there's a picture of a CR3020 3V battery.

After changing a fair variety of this style battery in kids toys and other things around the house
it's not a size I was familiar with. My good friends Google and eBay didn't turn up anything on that size.

There is an image of a demo board that has a CR2032 on it. Must have been artistic license on the others.
chuckc


On 2/16/2012 2:08 PM, PICdude wrote:
{Quote hidden}

>> -

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