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;
Previous article:Silicon C8051F340 clock system
Next article:MCU Simulation Serial Port Experiment
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
- Principles and Applications of Single Chip Microcomputers and C51 Programming (3rd Edition) (Xie Weicheng, Yang Jiaguo)
- MCU Principles and Interface Technology C51 Programming (Edited by Zhang Yigang)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- 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
- With these experiences, novices can easily choose MOSFET
- Seeking sensors that can monitor objects in the soil
- Agitek Engineers - How to Measure Cable Impedance and Loss Using a Vector Network Analyzer
- How to Layout a Circuit Board for an Op Amp
- 【RVB2601 debugging record 2】+ uGUI porting
- Visitor registration is in progress丨2021 Munich South China Electronics Show (Shenzhen International Convention and Exhibition Center) invites you to participate!
- Motion Detector Using MSP430 Launchpad and PIR Sensor
- 2022 Digi-Key Innovation Design Competition Unboxing
- 【Smart network desk lamp】9. Maix bit driver serial port
- [N32L43X Review] 3. Debugging tools JlinkRTT&Shell