How to use flash memory to store data?

Posted on 2016-11-23
Medium Priority
Last Modified: 2016-12-19
How to use flash memory of PIC32 controller to store data?
How to read and write data in flash memory of PIC32 controller?
Request for sample code.
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
LVL 21

Accepted Solution

viki2000 earned 2000 total points (awarded by participants)
ID: 41901230
Hi Ganesh,

Are you familiar with PIC microcontrollers family?
Do you know how to write code for other smaller chips as PIC10F or PIC12F or PIC16F or PIc18F?
If you know that, then PIC32 is only a bigger brother with more complex internal architecture that you must learn.
Writing the code is similar.
For small family you can write in ASM or C, but for bigger chips with more complex codes and functions C is proffered language.
The programming environment is MPLABX from Microchip, which is free to download and use, but then you need a C compiler, either from Microchip or 3rd party and that is not free. Then you need a programmer or for test purpose you may use simulators.
There are are also visual programming software as Flowcode, but you must check in what version PIC32 is included.

A PIC microcontroller has flash memory to store the program and RAM memory for data.
Here are the specs:

And code examples for PIC32 you may find here:

If you are a programmer with experience then you need to tell  if you want to use the flash memory to store "data" and not program and how often do you write data on flash, because there is endurance, limited cycles.
For example 8 bit family has HEF memory:
And this application note shows how to use HEF as EPROM:

For 32 bit family you should look at the documents from this page bottom:

Here is the memory organization:
Here is the flash programming specs:
And perhaps this is what you need "Flash Memory with Support for Live Update" , with examples at the end of file:
LVL 21

Assisted Solution

viki2000 earned 2000 total points (awarded by participants)
ID: 41901242
LVL 21

Expert Comment

ID: 41907143
Hi Ganesh,
Was of any help the answer above?
Did you try any code?
LVL 21

Expert Comment

ID: 41930601
The provided answer are valid, despite the fact that the person which asked the question did not reply.

Featured Post

Sign your company up to try the MB 660 headset now

Take control and stay focused in noisy open office environments with the MB 660. By reducing background noise, you can revitalize your office and improve concentration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question