PIC microcontroller EEPROM problem

Publisher:TranquilOasisLatest update time:2015-09-18 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1. IDE online debugging, VIEW->EEPROM does not see any changes: it may not be refreshed; need to reset and then see
2. Power-off writing is incorrect:

it is necessary to ensure that the VCC voltage is stable enough before the EEPROM writing is completed. A few suggestions:
1) Increase the capacity of the energy storage capacitor at the front end of the VCC regulator;
2) Detect the power-off event as soon as possible;
3) Cut off the path that consumes the energy of the energy storage capacitor as soon as possible;
4) Enter the process of saving parameters as soon as possible.

1) It takes time to write to EEPROM, usually 4~10ms
2) If a power outage occurs during this time, the writing may be wrong
3) The solution is to use a capacitor to maintain a certain writing time after detecting the power outage.
Reference address:PIC microcontroller EEPROM problem

Previous article:PIC reset problem
Next article:PIC microcontroller compilation error summary

Recommended ReadingLatest update time:2024-11-15 15:46

Design and writing of C program for STC single chip AD and EEPROM driver
The stc microcontroller has the advantages of in-application programming and convenient debugging; it has a 10-bit AD; internal eeprom; it can work at 1T/machine cycle, which is 12 times the speed of traditional 51 microcontrollers; the following is the AD and EEPROM driver C code I wrote: /*--------------------------
[Microcontroller]
EEPROM (AT24C16) page write algorithm
1. Write in front Anyone who studies microcontrollers or engages in embedded development will be familiar with EEPROM, especially the 24 series EEPROM, which are very classic, such as AT24C02, AT24C16, etc. It is easy to drive this series of EEPROM. Various tutorials, source codes, and drivers can be easily found and
[Microcontroller]
Analysis of the process of reading and writing data in single chip EEPROM
EEPROM write data process The first step is the I2C start signal, followed by the first byte, which is the I2C device address we talked about earlier, and select the "write" operation in the read and write direction. The second step is to send the storage address of the data. 24C02 has a total of 256 bytes of storag
[Microcontroller]
Analysis of the process of reading and writing data in single chip EEPROM
STM8 EEPROM unlocking is repeatable
After the STM8 EEPROM is reset, if you want to write data, you must unlock it first, otherwise you will not be able to write data. Unlocking means writing to FLASH_DUKR in sequence: The first hardware key: 0xAE Second hardware key: 0x56 Two bytes of data. At this time, the DUL bit in FLASH_IAPSR will become 1,
[Microcontroller]
EEPROM read and write examples
Almost all AVR microcontrollers are equipped with Flash ROM, SRAM, and EEPROM memories. Flash ROM is a program memory that is not afraid of power failure; SRAM is a static data memory that loses data after power failure; EEPROM is an electrically erasable memory that is not afraid of power failure and is generally used
[Microcontroller]
MCU EEPROM multi-byte read and write operation timing
It is very simple to read EEPROM. EEPROM directly sends out data according to the timing we send, but writing EEPROM is not so simple. After sending data to EEPROM, it is first saved in the EEPROM cache. EEPROM must move the data in the cache to the "non-volatile" area to achieve the effect of not losing data when pow
[Microcontroller]
Analysis of EEPROM Reading and Writing of AVR Microcontroller
Introduction: This article introduces the time problem of reading and writing data in EEPROM of AVR microcontroller, and analyzes the advantages and disadvantages of three methods. Since the AVR EEPROM write cycle is relatively long (usually in milliseconds), special attention should be paid during programming. Ther
[Microcontroller]
STC MCU internal EEPROM program
#include #include #define uchar unsigned char #define uint unsigned int   sfr ISP_DATA = 0x00E2; //EEPORM data register sfr ISP_ADDRH = 0x00E3; //Address register high eight bits sfr ISP_ADDRL = 0x00E4; //Address register low eight bits sfr ISP_CMD = 0x00E5; //EEPORM command register sfr ISP_TRIG = 0x00E6; /
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号