When I switched to ST and AVR, I didn’t read the relevant documents systematically. I just got the datasheet and prepared the tools according to the project and started. I read the features and pins the most, so I often neglected some details. After experiencing painful lessons, I summarized some...
1. When downloading programs to Tiny25 via ISP, I found that all the data in the built-in EEPROM was cleared and reset to 0xFF. After many practices, it can be said that when downloading programs to AVR microcontrollers, all the data in the internal EEPROM will be reset. Therefore, if you want to burn some initialization values to the EEPROM, the best way is to define a .eeprom segment, and then burn the generated eep file to the EEPROM after burning the FLASH program. Modifying Fuse and LockBits will not affect the EEPROM data.
2. If the A/D pin of Tiny5 is suspended, the AD voltage of the A/D pin will be affected by the voltage of other pins. Therefore, when using the A/D module, make sure that each A/D pin is not suspended, and unused pins can be pulled up or down. This principle should be applied not only to A/D pins, but also to other digital pins. No suspended pins should be left to reduce hidden dangers and EMI.
3. After turning on the LockBits of the AVR microcontroller, reading the FLASH program and EEPROM data will both be FF, but you can re-download the program to the FLASH. After downloading the program, LockBits will be automatically cleared and is closed by default.
Previous article:AVR Interrupt Priority
Next article:Intelligent home monitoring system based on AVR microcontroller
- 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
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- Don't know UWB? Then take a look at these knowledge posts shared by netizens to quickly understand ultra-wideband UWB
- There should be a simpler way to convert a sine wave into a triangle wave. If you have ever used a triangle wave, please share your experience...
- TI TMS320C6678 Evaluation Module
- The output voltage of the Zener diode is too low
- I bought a small thing, guess what it is
- BlueNRG ADC2 reads back incorrect voltage value
- Getting Started with Robot Operating System
- ATA-1000 Series Broadband Amplifier Series Introduction
- Share: A summary of the most comprehensive answers to various questions in the 2019 e-sports competition
- Live broadcast at 10:30 am today | A brief discussion on Microchip's FPGA products and intelligent embedded vision solutions