Several important summaries of AVR microcontrollers

Publisher:JoyfulSpirit5Latest update time:2013-07-31 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Several important summaries of AVR microcontrollers

Previous article:AVR Interrupt Priority
Next article:Intelligent home monitoring system based on AVR microcontroller

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号