Exact match. Not showing close matches.
PICList
Thread
'[PIC] QQ: Accurate clock w/o T1OSI/T1OSO?'
2012\02\16@000056
by
PICdude
|
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
2012\02\16@043324
by
peter green
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
2012\02\16@052502
by
alan.b.pearce
> > 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
2012\02\16@060134
by
IVP
2012\02\16@075051
by
PICdude
|
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_OUTplugwashTakeThisOuT
p10link.net>:
{Quote hidden}> 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@081707
by
PICdude
2012\02\16@083106
by
PICdude
(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 <picdude3
KILLspamnarwani.org>:
{Quote hidden}
>> -
2012\02\16@085035
by
alan.b.pearce
> (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
>> 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
2012\02\16@104033
by
alan.b.pearce
> > 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
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_OUT
TakeThisOuTmindspring.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
> (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
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}> 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<
chucksea
spam_OUTmindspring.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?
>> -
More... (looser matching)
- Last day of these posts
- In 2012
, 2013 only
- Today
- New search...