The PIC16C5X series has four oscillator options: standard crystal/ceramic oscillator (XT), low frequency low power oscillator (LP), high speed oscillator (HS) and resistor-capacitor oscillator (RC). In EPROM-type microcontrollers and microcontrollers with the suffix RC, the oscillator circuit can be selected by programming the configuration bit EPROM. The oscillator in the QTP microcontroller is set at the factory and can be tested by specific methods.
[1]. Quartz crystal oscillator.
In the XT, HS or LP mode of the PIC16C5X microcontroller, OSC1 and OSC2 require an external quartz crystal or ceramic oscillator, as shown in the figure below. The HS oscillator requires a series resistor Rs, and the value of Rs ranges from 100 ohms to 1k ohms.
When the microcontroller uses a quartz crystal oscillator or a ceramic oscillator, the capacitor used and the frequency generated are different. A large capacitor value is conducive to oscillation stability, but it prolongs the start-up time. When using a ceramic oscillator, the selected capacitor capacity and the generated oscillation frequency are shown in Table 1. When using a quartz oscillator, the selected capacitor capacity and the generated oscillation frequency are shown in Table 2. |
Table 1 Ceramic oscillators and matching capacitors | |||
Oscillator Type | Ceramic oscillator frequency | Capacitance (C1=C2)/pF | |
XT | 455kHz | 150-330 | |
2.0MHz | 20-330 | ||
4.0MHz | 20-330 | ||
HS | 8.0MHz | 20-330 |
[2]. RC oscillator. For applications where timing accuracy is not required, RC oscillators can significantly reduce costs. The frequency of the RC oscillator is related to the power supply voltage VDD, the external resistor REXT, the external capacitor CEXT, and the operating temperature. Due to inconsistencies in parameters during the manufacturing process, the frequency of the oscillator may be different for each microcontroller. In addition, the different lead distribution capacitances of different packaging methods will also affect the oscillation frequency, which is particularly obvious when the value of the external capacitor CEXT is small. Users also need to consider the errors of the external resistors REXT and CEXT used. |
Table 2 Quartz crystal oscillator and matching capacitor | |||
Oscillator Type | Oscillator frequency | Capacitance C1/pF | Capacitance C2/pF |
LP | 32kHz | 15-30 | 15 |
XT | 100kHz | 15-30 | 200-200 |
200kHz | 15-30 | 100-200 | |
455kHz | 15-30 | 15-100 | |
1MHz | 15-30 | 15-30 | |
2MHz | 15 | 15 | |
4MHz | 15 | 15 | |
HS | 4MHz | 15 | 15 |
8MHz | 15 | 15 | |
20MHz | 15 | 15 |
Figure 2 is the wiring diagram of the RC oscillation circuit. When the value of the external resistor REXT is less than 2.2kΩ, the oscillator may not work stably or even fail to oscillate. When the resistance REXT is too large (such as greater than 1MΩ), the oscillator is easily affected by noise, humidity and leakage interference and becomes unstable. We recommend that the value range of REXT be 5-100kΩ. The oscillator can work without an external capacitor, but in order to prevent interference and improve stability, it is recommended to use a capacitor of more than 20pF. When using a small capacitor, the oscillation frequency will change due to the influence of the distributed capacitance of the printed board and the package leads. Table 3 shows the oscillation frequency at different resistance and capacitance values. When RC oscillates, OSC2 is output as CLKOUT (CLKOUT=fOSC/4). |
Table 3 Oscillation frequency of RC oscillator with different resistance and capacitance | |||
CEXT/pF | REXT/kΩ | Average oscillation frequency fOSC@5V,25℃ |
|
20 | 3.3 | 4.973MHz | ±27% |
5 | 3.82MHz | ±21% | |
10 | 2.22MHz | ±21% | |
100 | 262.15kHz | ±31% | |
100 | 3.3 | 1.63MHz | ±13% |
5 | 1.19MHz | ±13% | |
100 | 684.64kHz | ±18% | |
100 | 71.56kHz | ±25% | |
300 | 3.3 | 660kHz | ±10% |
5 | 484.1kHz | ±14% | |
100 | 267.63kHz | ±15% | |
100 | 29.44kHz | ±19% |
[3]. External oscillation. In the PIC16C5X microcontroller, an external oscillator source can also be used to provide a clock source. The external clock is input into the microcontroller from the OSC1 terminal, and OSC2 is left empty. The external clock is only used for microcontrollers with HS, XT and LP oscillators. See Figure 3. |
Previous article:PIC16C5X Low Power Mode
Next article:PIC16C5X I/O Ports
Recommended ReadingLatest update time:2024-11-16 13:23
Time Domain Clock Jitter Analysis (Part 1)
In this three-part series, Part 1 focuses on how to accurately estimate the jitter of a clock source and how to combine it with the aperture jitter of the ADC. In Part 2, this combined jitter will be used to calculate the SRN of the ADC, which will then be compared with actual measurements. Part 3 will show how to f
[Analog Electronics]
Internal clock switching of stm8s
The internal 128K low-speed clock of stm8s105k6 needs to be used, and the debugging is not very smooth, so I would like to record it. Switch from the internal 16M clock to the internal 128K clock, the configuration is as follows: void Clk_Config(void) { CLK_CKDIVR= 0x00; //System clock 1 division while(!(CLK_I
[Microcontroller]
STM8S three clock source configuration HSE\HSI\LSI configuration
1. About the HSE clock configuration as the main clock static void CLK_Config(void) { CLK_DeInit(); // Initialization CLK_HSECmd(ENABLE); //Enable HSE CLK_ClockSwitchConfig(CLK_SWITCHMODE_AUTO, CLK_SOURCE_HSE, DISABLE, CLK_CURRENTCLOCKSTATE_DISABLE); //Switch HSE and turn o
[Microcontroller]
Calendar clock program written in C512
********************************************************************************************************* * FORMAT CURRENT TIME INTO STRING * * Description : Formats the current time into an ASCII string. * Arguments : mode is the format type: * 1
[Microcontroller]
The STM32F30X clock is initialized to HSI 64Mhz and uses PLLCLK as the system clock
void SYSCLK_Config_HSI_64Mhz(void) { __IO uint32_t StartUpCounter = 0, HSIStatus = 0; /* SYSCLK, HCLK, PCLK2 and PCLK1 configuration ---------------------------*/ /* Enable HSI */ RCC- CR |= ((uint32_t)RCC_CR_HSION); /* Wait till HSI is ready and if Time out is reached
[Microcontroller]
51 MCU frequency division, machine cycle, clock cycle, state cycle
(1) Oscillation period = clock period: refers to the period of the oscillation source that provides the clock pulse signal for the microcontroller.
(2) State cycle: Each state cycle is twice the clock cycle, which is obtained by dividing the oscillation cycle by two. Detailed explanation: In the 8051 microcontroll
[Microcontroller]
Why does STM32 have to configure the clock first and then the GPIO?
All registers require a clock to be configured. The registers are composed of D flip-flops. Only when the clock is sent can the flip-flops be rewritten.
Any peripheral of any MCU needs a clock, and the same is true for 8051. In order to allow users to better understand power consumption, STM32 sets a switch for th
[Microcontroller]
s3c6410 clock initialization
Today, I encountered a problem when I wrote the bootloader to initialize the clock. I wrote it down. For easy understanding, I have screenshots for most of them. Let me explain that the pictures are from the data manual. I also hope that the comrades who read this article will refer to the data manual more to unders
[Microcontroller]
Recommended Content
Latest Microcontroller Articles
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
MoreDaily News
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
Guess you like
- In a circuit powered by a DC voltage source, three capacitors are connected in series and in parallel. What is the final voltage distribution?
- I accidentally found a foreign website "LoBo MicroPython"
- Recruiting part-time artificial intelligence teachers
- [RVB2601 Creative Application Development] 4. Get weather information with cJSON
- How 6 is WiFi 6? Is it a leap forward or a trick? This article tells you whether WiFi 6 routers are worth buying
- LPS33W MEMS Pressure Sensor Data
- 【CH579M-R1】Testing the WS2812 Driver
- The result register value of DSP28377D fluctuates greatly after ADC sampling
- Has anyone used this kind of constant current solution with a single IC for two channels?
- It’s the Little New Year! It’s not the Little New Year yet? When does your family celebrate the Little New Year?