AVR chips use
fuses
to set the clock, boot time, enable some functions, BOOT area settings, and of course the most troublesome confidentiality bit for beginners. If you don't set it well, it will be very troublesome to lock the chip. To minimize the power consumption of the MCU, you also need to understand the settings of some bits.
1: Unprogrammed
0: Programmed
1. BOD (Brown-out Detection) brown-out 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 allowed
How to use: If BODEN is enabled (checkbox is selected) to start brown-out 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 resume work after tTOUT delay weeks.
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, SUT is different.
If there is no special requirement, it is recommended to set the reset start time of SUT 1/0 to be slightly longer so that the power supply rises slowly.
3.CKSEL3/0: Clock source selection (clock summary table)
Clock summary table
Clock source start 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 oscillation
1MHZ 6 CK + 0 ms CKSEL = "0001" SUT = "00"
Internal RC oscillation 1MHZ 6 CK + 4.1 ms CKSEL = "0001" SUT = "01"
Internal RC oscillation 1MHZ1 6 CK + 65 ms CKSEL = "0001" SUT = "10"
Internal RC oscillation 2MHZ 6 CK + 0 ms CKSEL = "0010" SUT = "00"
Internal RC oscillation
2MHZ 6 CK + 4.1 ms CKSEL="0010" SUT="01"
Internal RC oscillator 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 oscillation 0.9-3.0MHZ 18 CK + 0 ms CKSEL="0110" SUT="00"
External RC oscillation 0.9-3.0MHZ 18 CK + 4.1 ms CKSEL="0110" SUT="01"
External RC oscillation 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"
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"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 258 CK + 4.1 ms CKSEL="1100" SUT="00"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 258 CK + 65 ms CKSEL="1100" SUT="01"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 1K CK + 0 ms CKSEL=1100 SUT="10"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 1K CK + 4.1 ms CKSEL="1100" SUT="11"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 1K CK + 65 ms CKSEL="1101" SUT="00"
Intermediate
frequency quartz/ceramic oscillator (0.9-3.0MHZ) 16K CK + 0 ms CKSEL="1101" SUT="01"
Intermediate frequency quartz/ceramic oscillator (0.9-3.0MHZ) 16K CK + 4.1ms CKSEL="1101" SUT="10"
Intermediate frequency 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"
[page]
1. JTAGEN (JTAG enable): 1: JTAG disabled; 0: JTAG enabled
OCDEN (OCD function enabled): 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 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 enabled): 1: SPI download disabled; 0: SPI download enabled
Note: In the ISP software, SPIEN cannot be edited and is 0 by default.
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 when 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. The advantage is that the power consumption is greatly reduced, but the frequency range is relatively narrow and other clock buffers cannot be driven.
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 working.
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 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:Special IC decryption technology AVR application skills
Next article:How to learn AVR microcontroller well
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
- 2021 ON Semiconductor Avnet RSL10 Bluetooth SoC Development and Design Competition, Fifth Post (Prototyping and Board Submission)
- msp430g2533 serial port assistant debugging program; connect 1.1 and 1.2 with Dupont line, and you can see the information on the serial port. Red and green...
- Summary: MianQi's journey to study motor drive (short video)
- The structure and characteristics of several commonly used capacitors
- Analysis of TL431 peripheral circuit
- Verilog serial communication design
- Parasitic parameter issues of vias in PCB
- [GD32L233C-START Review] 3. DMA issues
- #idlemarket#Selling GigaDevice GD32 E231C-START development board
- Goodbye 2019 ~ Hello 2020 - Looking back at 2019 and planning for 2020