(1) In the AVR device manual, the fuse bit is defined as programmed (Programmed) and unprogrammed (Unprogrammed). "Unprogrammed" means the fuse state is "1" (disabled); "Programmed" means the fuse state is "0" (enabled). Therefore, the process of configuring the fuse bit is actually "configuring the fuse bit to be unprogrammed state "1" or programmed state "0"".
(2) When using programming tool software that allows you to determine the fuse bit status value by checking the box, please first read the software instructions carefully to understand whether "√" means setting the fuse bit status to "0" or "1".
(3) When using the programming download program in CVAVR, special attention should be paid. Since the initial state of most fuse bits is defined as "1" when the CVAVR programming download interface is initially opened, do not use the "all" option in its programming menu options. At this time, the "all" option will configure the fuse bits of the chip according to the initial state definition of the fuse bits, but in fact it is often not the configuration result required by the user. If you want to use the "all" option, you should first use "read->fuse bits" to read the actual state of the fuse bits in the chip, and then use the "all" option.
(4) Before using a new AVR chip, you should first check the configuration of its fuse bits, then configure the fuse bits according to actual needs, and record the status of each fuse bit for filing.
(5) After the AVR chip is encrypted, only the data in the internal Flash and E2PROM of the chip cannot be read. The status of the fuse bits can still be read, but the configuration cannot be modified. The chip erase command clears the data in the Flash and E2PROM, and at the same time configures the status of the two lock bits to "11", which is in an unlocked state. However, the chip erase command does not change the status of other fuse bits.
(6) The correct operation procedure is: when the chip is unlocked, download the running code and data, configure the relevant fuse bits, and finally configure the chip lock bits. After the chip is locked, if the fuse bits are found to be incorrectly configured, the chip erase command must be used to clear the data in the chip and unlock it. Then re-download the running code and data, modify the configuration-related fuse bits, and finally configure the chip lock bits again.
(7) When using ISP serial download programming, the SPIEN fuse bit should be configured to "0". The default state of the SPIEN bit when the chip leaves the factory is "0", indicating that ISP serial download data is allowed. Only when this bit is in the programmed state "0" can ISP download be performed through the SPI port of the AVR. If this bit is configured as unprogrammed "1", ISP serial download data is immediately prohibited. At this time, the SPIEN state can only be reset to "0" through parallel mode or JTAG programming to open ISP. Under normal circumstances, the SPIEN state should be kept at "0". Allowing ISP programming will not affect the I/O function of its pins, as long as the ISP interface and the devices connected in parallel are isolated when designing the hardware circuit, such as using series resistors or circuit breaker jumpers.
(8) When your system does not use the JTAG interface for download programming or real-time online simulation debugging, and the pins of the JTAG interface need to be used as I/O ports, the fuse bit JTAGEN must be set to "1". The JTAGEN state of the chip is "0" by default when it leaves the factory, indicating that the JTAG interface is allowed and the external pins of JTAG cannot be used as I/O ports. When the JTAGEN state is set to "1", the JTAG interface is immediately disabled. At this time, JTAG can only be reset to "0" and JTAG can only be opened through parallel mode or ISP programming.
(9) In general, do not set the fuse to define the RESET pin as I/O (such as setting the ATmega8 fuse RSTDISBL to "0"). This will cause the ISP download programming to be unable to proceed, because before entering the ISP mode programming, the RESET pin needs to be pulled low to put the chip into the reset state first.
(10) When using an AVR chip with an internal RC oscillator, pay special attention to the configuration of the fuse bit CKSEL. Generally, the default state of the CKSEL bit when the chip leaves the factory is to use the internal 1MHz RC oscillator as the system clock source. If you use an external oscillator as the system clock source, do not forget to correctly configure the CKSEL fuse bit first, otherwise the timing of your entire system will be problematic. When your design does not use an external oscillator (or a specific oscillation source) as the system clock source, do not misoperate or mistakenly configure the CKSEL fuse bit to use an external oscillator (or other different types of oscillation sources). Once this happens, the chip cannot be operated using the ISP programming method (because the ISP method requires the chip's system clock to work and generate timing control signals), and the chip looks "broken". At this time, the only way to save it is to remove the chip and use the parallel programming method, or use the JTAG method (if JTAG is allowed and there is a JTAG interface on the target board). Another way to solve the problem is to try to temporarily add different types of oscillation clock signals to the crystal pins of the chip. Once the ISP can operate the chip, immediately configure CKSEL to use the internal 1MHz RC oscillator as the system clock source, and then reconfigure CKSEL correctly according to the actual situation.
(11) When using an AVR chip that supports IAP, if you do not use the BOOTLOADER function, be careful not to set the fuse bit BOOTRST to "0", as it will cause the chip to not start executing the program from 0x0000 of the Flash when it is powered on. The default state of the BOOTRST bit is "1" when the chip leaves the factory. For the configuration of BOOTRST, the design of the BOOTLOADER program, and the application of IAP, please refer to the relevant content in this chapter.
2. mega8 fuse bit: 1: Not programmed (not selected) 0: Programmed (selected)
***************************************
Fuse bit
******************************************
RSTDISBL:
WDTON:
SPIEN:
EEAVE:
BODEN:
BODLEVEL:
BOOTRST:
******************************************
BOOTSZ1/0:
00: 1024Word/0xc00;
01: 512Word/0xe00;
10: 256Word/0xf00;
11: 128Word/0xf80
***************************************
BLB02/01:
11: Both SPM and LPM instructions are allowed to execute
10: SPM instruction prohibits writing program area
01: Boot area LPM instruction prohibits reading program area content; if the interrupt vector is defined in the boot area, the interrupt is prohibited from executing in the program area.
00: SPM instruction prohibits writing program area; Boot area LPM instruction prohibits reading program area content; if the interrupt vector is defined in the boot area, the interrupt is prohibited from executing in the program area.
***************************************
BLB12/11:
11: Both SPM and LPM instructions are allowed to execute
10: SPM instruction prohibits writing to the boot sector
01: Program area LPM instruction prohibits reading the boot sector content; if the interrupt vector is defined in the program area, the interrupt is prohibited from executing in the boot sector.
00: SPM instruction prohibits writing to the boot sector; program area LPM instruction prohibits reading the boot sector content; if the interrupt vector is defined in the program area, the interrupt is prohibited from executing in the boot sector.
***************************************
LB2/1:
11: Unencrypted
10: Program and EEPROM programming functions disabled, fuse bit locked
00: Program and EEPROM programming and verification functions disabled, fuse bit locked
(Note: program other fuse bits first, then program the encryption bit)
***************************************
CKSEL3/0:
CKOPT:
SUT1/0:
***************************************
CKSEL3/0=0000: External clock, CKOPT=0: Allow the chip's internal XTAL1 pin to connect a 36PF capacitor to GND; CKOPT=1: Disable the capacitor
----------------
CKSEL3/0=0001-0100: Calibrated internal RC oscillator, CKOPT is always 1
0001: 1.0M
0010: 2.0M
0011: 4.0M
0100: 8.0M
----------------
CKSEL3/0=0101-1000: External RC oscillation, CKOPT=0: Allow the chip's internal XTAL1 pin to connect a 36PF capacitor to GND; CKOPT=1: Disable this capacitor
0101: <0.9M
0110: 0.9-3.0M
0111: 3.0-8.0M
1000: 8.0-12.0M
----------------
CKSEL3/0=1001: External low-frequency crystal oscillator, CKOPT=0: Allow the chip's internal XTAL1/XTAL2 pins to connect a 36PF capacitor to GND; CKOPT=1: Disable this capacitor
----------------
CKSEL3/0=1010-1111: External crystal oscillator, ceramic resonator, CKOPT=0: High amplitude oscillation output; CKOPT=1: Low amplitude oscillation output
101X: 0.4-0.9M
110X: 0.9-3.0M
111X: 3.0-8.0M
***************************************
SUT1/0:
When different crystal oscillators are selected, SUT is different.
3. Clock selection list
Clock source
External clock
External clock
External clock
Internal RC oscillation 1MHZ
Internal RC oscillation 1MHZ
Internal RC oscillation 1MHZ
Internal RC oscillation 2MHZ
Internal RC oscillation 2MHZ
Internal RC oscillator 2MHZ
Internal RC oscillator 4MHZ
Internal RC oscillator 4MHZ
Internal RC oscillator 4MHZ
Internal RC oscillator 8MHZ
Internal RC oscillator 8MHZ
Internal RC oscillator 8MHZ
External RC oscillation ≤ 0.9MHZ
External RC oscillation ≤ 0.9MHZ
External RC oscillation ≤ 0.9MHZ
External RC oscillation ≤ 0.9MHZ
External RC oscillation 0.9-3.0MHZ
External RC oscillation 0.9-3.0MHZ
External RC oscillation 0.9-3.0MHZ
External RC oscillator 0.9-3.0MHZ
External RC oscillator 3.0-8.0MHZ
External RC oscillator 3.0-8.0MHZ
External RC oscillator 3.0-8.0MHZ
External RC oscillator 3.0-8.0MHZ
External RC oscillator 8.0-12.0MHZ
External RC oscillator 8.0-12. 0MHZ
External RC oscillator 8.0-12.0MHZ
External RC oscillator 8.0-12.0MHZ
Low frequency crystal oscillator (32.768KHZ)
Low frequency crystal oscillator (32.768KHZ)
Low frequency crystal (32.768KHZ)
Low frequency quartz/ceramic oscillator (0.4-0.9M) 258 CK + 4.1 ms
Low quartz/ceramic oscillator (0.4-0.9M)
Low quartz/ceramic oscillator (0.4-0.9M)
Low quartz/ceramic oscillator (0.4-0.9M)
Low quartz/ceramic oscillator (0.4-0.9M)
Low Quartz/Ceramic Oscillator (0.4-0.9M)
Low Quartz/Ceramic Oscillator (0.4-0.9M)
Low Quartz/Ceramic Oscillator (0.4-0.9M)
Medium Quartz/Ceramic Oscillator (0.9-3.0M)
Medium Quartz/Ceramic Oscillator (0.9-3.0M)
Quartz/Ceramic Oscillator (0.9-3.0M)
1K
Previous article:Key points of AVR M16 ADC application design
Next article:ATmega16 A/D related registers
Recommended ReadingLatest update time:2024-11-16 13:34
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Environmental Monitoring System
- Are only foreign companies exempt from overtime work?
- 【micropython】Improved reset to bootloader
- 06 Make GD32L233C expansion board
- The names, wavelengths, characteristics and application fields of each band in the electromagnetic spectrum
- [TI Course] How is the anti-interference ability of TI millimeter-wave radar?
- The ampere-second product of capacitance and the volt-second product of inductance
- Regarding the distinction between NMOS tubes and PMOS tubes
- Pins 2 and 4 are missing from the schematic and package of the BNX016-01 device
- SIMetrix-SIMPLIS ~1~