The ATmega168 chip has the following clock sources that are selected by Flash fuses: The clock is input to the AVR clock generator and then distributed to the corresponding modules.
The different clock options are described in the following sections. Any clock source requires a high enough Vcc to start the oscillator and a minimum oscillation period to ensure that the power supply reaches a stable level before normal operation begins.
To ensure a high enough Vcc, the device remains in the internal reset state for a timeout delay (tTOUT) after the other reset sources are released. P37 "System Control and Reset" describes the start conditions of the internal reset. This delay (tTOUT) is timed by the watchdog oscillator, and the number of delay cycles is set by the fuse bits SUTx and CKSELx. Table 5 lists the optional delays. The frequency of the watchdog oscillator is determined by the operating voltage, see P283 "ATmega168 Typical Characteristics - Initial Data" for details.
The main purpose of the delay is to ensure that the AVR is in reset state before the system can provide the minimum Vcc that meets the application requirements. The MCU does not monitor the actual voltage during the delay process. Therefore, it is up to the user to choose a suitable delay time that is longer than the Vcc rise time. If this is not possible, an internal/external BOD should be used. The BOD circuit ensures that the Vcc is high enough before releasing the reset. The timeout delay can be disabled when using the BOD. We do not recommend disabling the timeout delay when the BOD circuit is not used.
The oscillator needs to oscillate for several cycles before the clock enters a stable state. A ripple counter inside the chip monitors the oscillator output clock and ensures that the internal reset is valid before a given number of cycles is reached. The counter then releases the reset signal and the device starts executing the program. The recommended oscillation startup time depends on the clock type and can be 6 cycles of an external clock to 32K cycles of a low-frequency crystal oscillator.
When the AVR chip starts from reset, the clock startup sequence includes the timeout delay and the startup time. After the CPU wakes up from power-down mode or power-saving mode, Vcc is considered high enough, so the startup sequence only includes the startup time.
Default clock source
The internal RC oscillator frequency of the ATmega168 device is calibrated to 8.0MHz when it leaves the factory and CKDIV8 is programmed to obtain a 1.0MHz system clock. The startup time is set to the longest and the timing cycle is enabled. (CKSEL = "0010", SUT = "10", CKDIV8 = "0"). This setting ensures that the user can obtain the required clock source through any valid programming interface.
Previous article:ATmega168 crystal oscillator
Next article:ATmega168 clock system and its distribution
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- I am a novice learning ESP8266 infrared remote control. I have searched around for micropython and it seems that there is no library related to infrared transceiver. Does anyone know...
- Recommended high voltage mosfet models
- Single-cell lithium battery fuel gauge
- CS5090 5V USB input charges 2 lithium batteries, with path management application, which can realize the function of "charging and discharging at the same time".
- Free review: National Technology low power series, N32L43x is now available for testing
- DSP interrupt system and its application
- FPGA Simplified Design Method Classic Case 3
- MSP430G2553 interrupt processing function
- Electrostatic Shielding
- In the second week after returning to work, I received: resignation form and notice of termination of labor contract!