Crystal for RTC

Status
Not open for further replies.
Yesterday i saw a board designed using PIC16f877A. They had a regular crystal oscilator of 8 MHZ but below that they had 32khz crystal with 33pf capacitor. now that board was a stopwatch so it has to do something with Time calculations.

First i thought why they had installed two crystals but later exploring it i thought it is for the time calculations. Any hint about it?

Note there was nothing else to calculate time just the rest of controllers pin controlled seven segment.
 
Hi,

The 32k crystal is used by Timer1 as a 1 second base to a software real time clock.

If you look at the Pic16F88 datasheet Timer1 section it gives full details of a RTC
 
As above, the 32k crystal on TIMER1 is used for the RTC, while the 8MHz is used to control how fast the program instructions is run. The 32k oscillator can run even when the rest of the PIC is in sleep mode, which means that the PIC is basically switched off, but can still keep track of the time.
 
The frequency is actually 32.768kHz, so that 1Hz can be easily obtained by simple binary division.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…