Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top