Книга: Introduction to Microprocessors and Microcontrollers

Using a crystal

Using a crystal

This gives a more accurate clock speed so that programs that involve real can be written. It may be that we want a display sequence to run at a particular rate.

To change to a crystal we need to set up the configuration bits in the PIC so that it knows that it is being controlled by a crystal instead of the RC method. This is most easily handled during the assembly process by clicking on ‘configuration bits’ and selecting the clock source from the options offered.

The two capacitors shown in Figure 16.3 in the clock circuit always have equal values and the range shown is suitable for 200 kHz and all clocks of 2 MHz and over. Other recommended values are: 32 kHz — 68/100 pF and 100 kHz — 100/150 pF. The higher values in each range results in higher stability but slower startup times.


Figure 16.3 A Crystal Controlled Clock

A ceramic resonator can be used as a plug-in replacement for the crystal.

Оглавление книги


Генерация: 0.110. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз