?
Solved

How to use flash memory to store data?

Posted on 2016-11-23
4
Medium Priority
?
89 Views
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.
0
Comment
Question by:GANESH GHATTE
[X]
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
4 Comments
 
LVL 21

Accepted Solution

by:
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:
https://www.microchip.com/design-centers/32-bit
https://www.sparkfun.com/datasheets/Components/SMD/PIC32MX.pdf
Datasheets:
https://www.microchip.com/doclisting/TechDoc.aspx?type=datasheet

And code examples for PIC32 you may find here:
https://www.microchip.com/doclisting/TechDoc.aspx?type=CodeExamples

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:
http://www.microchip.com/design-centers/8-bit/peripherals/core-independent/high-endurance-flash-hef
And this application note shows how to use HEF as EPROM:
http://ww1.microchip.com/downloads/en/AppNotes/00001673A.pdf

For 32 bit family you should look at the documents from this page bottom:
http://www.microchip.com/design-centers/32-bit

Here is the memory organization:
http://ww1.microchip.com/downloads/en/DeviceDoc/60001115H.pdf
Here is the flash programming specs:
http://ww1.microchip.com/downloads/en/DeviceDoc/60001145S.pdf
And perhaps this is what you need "Flash Memory with Support for Live Update" , with examples at the end of file:
http://ww1.microchip.com/downloads/en/DeviceDoc/60001193B.pdf
1
 
LVL 21

Assisted Solution

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

Expert Comment

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

Expert Comment

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

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