Beginners often don't understand fuses. AVR chips use fuses to set the clock, boot time, enable some functions, BOOT area settings, and of course the most troublesome bit for beginners. If you don't set it well, it will be very troublesome to lock the chip. If you want to minimize the power consumption of the MCU, you also need to understand the settings of some bits.
1: Not programmed
0: Programming
1.BOD (Brown-out Detection) power failure detection circuit
BODLEVEL (BOD level selection): 1: 2.7V level; 0: 4.0V level
BODEN (BOD function control): 1: BOD function disabled; 0: BOD function enabled
Usage: If BODEN is enabled (checkbox is selected) to start the power-off detection, the detection level is determined by BODLEVEL. Once VCC drops below the trigger level (2.7v or 4.0v), the MCU is reset; when the VCC level is greater than the trigger level, it will restart after tTOUT delay cycle.
Because M16L can work at 2.7v~5.5v, the trigger level can be selected as 2.7v (BODLEVEL=1) or 4.0v (BODLEVEL=0); while M16 works at 4.5~5.5V, so only BODLEVEL=0 can be selected, BODLEVEL=1 is not applicable to ATmega16.
2. Reset start time selection
SUT 1/0: When different crystal oscillators are selected, the SUT is different.
If there is no special requirement, it is recommended to set the reset startup time of SUT 1/0 to be slightly longer so that the power supply can rise slowly.
3.CKSEL3/0: Clock source selection (clock table)
Clock table
Clock source start-up delay fuse
External clock 6 CK + 0 ms CKSEL=0000 SUT="00"
External clock 6 CK + 4.1 ms CKSEL=0000 SUT="01"
External clock 6 CK + 65 ms CKSEL="0000" SUT="10"
Internal RC oscillator
1MHZ 6 CK + 0 ms CKSEL="0001" SUT="00"
Internal RC oscillation 1MHZ 6 CK + 4.1 ms CKSEL="0001" SUT="01"
Internal RC oscillator 1MHZ1 6 CK + 65 ms CKSEL="0001" SUT="10"
Internal RC oscillation 2MHZ 6 CK + 0 ms CKSEL="0010" SUT="00"
Internal RC oscillator
2MHZ 6CK + 4.1ms CKSEL="0010" SUT="01"
Internal RC oscillation 2MHZ 6 CK + 65 ms CKSEL="0010" SUT="10"
Internal RC oscillator 4MHZ 6 CK + 0 ms CKSEL="0011" SUT="00"
Internal RC oscillator 4MHZ 6 CK + 4.1 ms CKSEL="0011" SUT="01"
Internal RC oscillator 4MHZ 6 CK + 65 ms CKSEL="0011" SUT="10"
Internal RC oscillator 8MHZ 6 CK + 0 ms CKSEL="0100" SUT="00"
Internal RC oscillator 8MHZ 6 CK + 4.1 ms CKSEL="0100" SUT="01"
Internal RC oscillator 8MHZ 6 CK + 65 ms CKSEL="0100" SUT="10"
External RC oscillation ≤ 0.9MHZ 18 CK + 0 ms CKSEL="0101" SUT="00"
External RC oscillation ≤ 0.9MHZ 18 CK + 4.1 ms CKSEL="0101" SUT="01"
External RC oscillation ≤ 0.9MHZ 18 CK + 65 ms CKSEL="0101" SUT="10"
External RC oscillation ≤ 0.9MHZ 6 CK + 4.1 ms CKSEL="0101" SUT="11"
External RC oscillator 0.9-3.0MHZ 18 CK + 0 ms CKSEL="0110" SUT="00"
External RC oscillator 0.9-3.0MHZ 18 CK + 4.1 ms CKSEL="0110" SUT="01"
External RC oscillator 0.9-3.0MHZ 18 CK + 65 ms CKSEL="0110" SUT="10"
External RC oscillator 0.9-3.0MHZ 6 CK + 4.1 ms CKSEL=0110 SUT="11"
External RC oscillator 3.0-8.0MHZ 18 CK + 0 ms CKSEL=0111 SUT="00"
External RC oscillator 3.0-8.0MHZ 18 CK + 4.1 ms CKSEL="0111" SUT="01"
External RC oscillator 3.0-8.0MHZ 18 CK + 65 ms CKSEL=0111 SUT="10"
External RC oscillator 3.0-8.0MHZ 6 CK + 4.1 ms CKSEL="0111" SUT="11"
External RC oscillator 8.0-12.0MHZ 18 CK + 0 ms CKSEL=1000 SUT="00"
External RC oscillator 8.0-12.0MHZ 18 CK + 4.1 ms CKSEL="1000" SUT="01"
External RC oscillator 8.0-12.0MHZ 18 CK + 65 ms CKSEL="1000" SUT="10"
External RC oscillator 8.0-12.0MHZ 6 CK + 4.1 ms CKSEL="1000" SUT="11"
Low frequency crystal oscillator (32.768KHZ) 1K CK + 4.1 ms CKSEL="1001" SUT="00"
Low frequency crystal oscillator (32.768KHZ) 1K CK + 65 ms CKSEL="1001" SUT="01"
Low frequency crystal oscillator (32.768KHZ) 32K CK + 65 ms CKSEL="1001" SUT="10"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 258 CK + 4.1 ms CKSEL="1010" SUT="00"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 258 CK + 65 ms CKSEL="1010" SUT="01"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 1K CK + 0 ms CKSEL=1010 SUT="10"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 1K CK + 4.1 ms CKSEL="1010" SUT="11"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 1K CK + 65 ms CKSEL="1011" SUT="00"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 16K CK + 0 ms CKSEL=1011 SUT="01"[page]
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 16K CK + 4.1ms CKSEL="1011" SUT="10"
Low frequency quartz/ceramic oscillator (0.4-0.9MHZ) 16K CK + 65ms CKSEL="1011" SUT="11"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 258 CK + 4.1 ms CKSEL="1100" SUT="00"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 258 CK + 65 ms CKSEL="1100" SUT="01"
IF quartz/ceramic oscillator (0.9-3.0MHZ) 1K CK + 0 ms CKSEL=1100 SUT="10"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 1K CK + 4.1 ms CKSEL="1100" SUT="11"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 1K CK + 65 ms CKSEL="1101" SUT="00"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 16K CK + 0 ms CKSEL="1101" SUT="01"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 16K CK + 4.1ms CKSEL="1101" SUT="10"
IF Quartz/Ceramic Oscillator (0.9-3.0MHZ) 16K CK + 65ms CKSEL="1101" SUT="11"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 258 CK + 4.1 ms CKSEL="111"0 SUT="00"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 258 CK + 65 ms CKSEL="111"0 SUT="01"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 1K CK + 0 ms CKSEL="111"0 SUT="10"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 1K CK + 4.1 ms CKSEL="111"0 SUT="11"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 1K CK + 65 ms CKSEL="1111" SUT="00"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 16K CK + 0 ms CKSEL="1111" SUT="01"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 16K CK + 4.1ms CKSEL="111"1 SUT="10"
High frequency quartz/ceramic oscillator (3.0-8.0MHZ) 16K CK + 65ms CKSEL="1111" SUT="11"
High position (BOOT area settings):
1. JTAGEN (JTAG enable): 1: JTAG disabled; 0: JTAG enabled
OCDEN (OCD function enable): 1: OCD function disabled; 0: OCD function enabled
Note: OCDEN (On-chip Debug): On-chip debug enable bit
JTAGEN (JTAG Enable): JTAG test access port
How to use: During JTAG debugging, enable OCDEN JTAGEN (check the box) and keep all lock bits in the unlocked state; in actual use, to reduce power consumption, do not enable OCDEN JTAGEN, which reduces the current by about 2-3mA.
2. SPIEN (SPI download enable): 1: SPI download disabled; 0: SPI download enabled
Note: In the ISP software, SPIEN cannot be edited and defaults to 0.
3. CKOPT (select amplifier mode): CKOPT=0: high amplitude oscillation output; CKOPT
=1: Low amplitude oscillation output
When CKOPT is programmed, the oscillator generates full amplitude oscillation at the output pin. This mode is suitable for noisy environments and situations where a second clock buffer needs to be driven through XTAL2, and the frequency range of this mode is relatively wide. When CKOPT is kept unprogrammed, the output signal amplitude of the oscillator is relatively small. Its advantage is that the power consumption is greatly reduced, but the frequency range is relatively narrow and it cannot drive other clock buffers.
For the resonator, the maximum frequency is 8 MHz when CKOPT is not programmed and 16 MHz when CKOPT is programmed. CKOPT is not programmed when the internal RC oscillator is operating.
4.EEAVE (EEPROM data retention during burning): 1: not retained; 0: retained
5.BOOTRST (reset entry selection): 1: program starts from address 0x0000 0: after reset
Execute from the BOOT area (refer to BOOTSZ0/1)
6.BOOTSZ 1/0 (boot area program size and entry):
00: 1024Word/0xc00;
01: 512Word/0xe00;
10: 256Word/0xf00;
11: 128Word/0xf80
Previous article:Which compiler is better for AVR microcontroller
Next article:AVR MCU TC0 fast PWM
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
- EEWORLD University Hall--The production process of a PCB board
- MCU serial port sends data frame
- EEWORLD University ---- Python Chinese video tutorial
- China Academy of Electronics Science Recruitment [Embedded] [Algorithm], etc.
- RL78 MCU Timer
- Microbit expansion board, using RJ11 connector, including all information
- Class B amplifier question: Under what circumstances will the transistors be turned on at the same time? What are the conditions?
- Participate in the RT-Thread Software Package Competition and win RoboMaster and other generous prizes!
- What are the benefits of DSP program architecture?
- Bluetooth protocol analysis (5)_Technical analysis related to BLE broadcast communication