Answers to C8051 oscillator related questions

Publisher:Enchanted2021Latest update time:2016-12-27 Source: eefocusKeywords:C8051 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

C8051F --- Oscillator 
Q: Is the internal clock oscillator stable? Can it be used to generate the baud rate time base?
A: The accuracy of the internal clock oscillator of different devices is different (±20%). It will also change with the power supply voltage (6.5%/V). But it basically does not change with temperature (<1% temperature change range -40℃~+85℃). Due to the large discreteness of the internal oscillator of different devices, it cannot be used to generate baud rate, and a standard crystal should be connected externally. However, some devices, such as C8051F3xx/f12x/f04x/f06x, have an internal oscillator accuracy of ±2%, which can be used to generate baud rate.
Q: How to configure the internal/external oscillator?
A: Correct steps:
1. Enable the external oscillator;
2. Wait for 1ms;
3. Query XTLVLD '0'->'1'
4. Switch to the external oscillator.
Note: The selection of the oscillator frequency is the configuration of the OSCXCN register (the setting of the external oscillator frequency control bit). For more information and source code, please refer to application note AN002 "Configuring Internal and External Oscillators". The application note can be downloaded from our company's website: www.xhl.com.cnQ
 
: What is the instruction execution speed of the C8051F MCU?
A: The CIP-51 core of the C8051F MCU adopts a pipeline structure, which greatly improves the instruction execution speed compared with the standard 8051 structure. The standard 8051 microcontroller requires 12 system clock cycles to execute a single-cycle instruction, while the C8051F MCU only needs one system clock cycle to execute a single-cycle instruction. If the system clock frequency is 25MHz, the time required to execute a single-cycle instruction is 40ns.
 
Q: What should be paid attention to when switching to an external crystal oscillator?
A: First, the external oscillator must be allowed, but the system clock source should still be the internal clock at this time. The system clock source can only be switched to the external oscillator after the external oscillator is stable. Otherwise, the switch cannot be made and the system crashes.
 
Q: What should be paid attention to when using an external crystal oscillator?
Answer: 1. All analog and digital power pins should be connected to power (2.7~3.6V);
2. A 10M resistor should be connected across the crystal pins of the C8051F3xx series devices (there is a typical wiring diagram of the C8051F series microcontrollers in the "Home" - "Schematic/PCB Library" of the Xinhualong website);
3. Crystal oscillators, capacitors and other related devices should be as close to the crystal pins of the microcontroller as possible.
 
Question: After the system clock switches to an external clock, should the internal clock be turned off?
Answer: You can choose to turn it off or not, but from the perspective of reducing power consumption, it should be turned off.
 
Question: Can the system clock be switched at any time in the program?
Answer: Yes, but when switching from internal to external again, the switching should be carried out according to the steps described in Technical Question 2.
 
Question: How to configure the chip pins when using an external crystal oscillator?
Answer: For devices with fixed crystal pins on the chip (such as C8051F02X), the corresponding clock input pins are automatically assigned according to the selected crystal mode.
For chips with crystal pins shared with GPIO (such as C8051F30X), the crystal pins should be set as follows:

(1) When an external crystal is connected, both XTAL1 and XTAL2 must be configured as analog inputs.

(2) When the external oscillator circuit is in "RC" or "C" mode, the XTAL2 pin should be configured as an analog input.

(3) When connecting to an external CMOS clock circuit, the XTAL2 pin should be configured as a digital input.

(4) In the above methods, the skip function must be used in the pin configuration to skip this pin.

 


Q: What is the maximum frequency of the external crystal oscillator?

Answer: The maximum frequency of the external crystal oscillator is 30MHz;


Keywords:C8051 Reference address:Answers to C8051 oscillator related questions

Previous article:Silicon C8051F340 clock system
Next article:MCU Simulation Serial Port Experiment

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号