Writting to flash on PIC
Moderator: Benj
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Writting to flash on PIC
Are there any way to write my data to flash program memory on PIC24? It does not have EEPROM so I want to use free flash space. Can this be done via FC or should I implement C/ASM code?
FC 6.1.3.2 (18.02.2016)
Re: Writting to flash on PIC
hi mikn,mikn wrote:Are there any way to write my data to flash program memory on PIC24? It does not have EEPROM so I want to use free flash space. Can this be done via FC or should I implement C/ASM code?
PIC24FJ256 Family EEprom that not have eeprom can emulation capable..
perhabs the same:
http://www.matrixtsl.com/mmforums/viewt ... 54&t=14980
from microchips are files in the postings added, examples and app note links.
the eeprom icon is for chips that have eeprom.
perhabs it helps you.
bw
rudi
Re: Writting to flash on PIC
Hi Mikn, not just at time, but Benj wrote in the named post, that eeprom icon "then this is currently not supported but in the pipeline"..mikn wrote:Rudi, finally, did you get the working code?
so i think with the microchip examples in the named post, this must / can be done.
I will try this comming weekend too.
In APP Note i read, it must be reserve a adress range for emulate eeprom in code
then it can be used as eeprom.
The things i mean can done as 16 bit/pointer in the adress
so if you reserve "nonstop" example 20 byte ( 1 byte = 8 Bit ..2 byte = 16 Bit ) it can be 10 * 16 bit ( = 160 Bit / 8 = 20 byte )
i hope i have calculate right
The examples are in the named post mikn.
bw
Rudi
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
Found documentation about EEPROM emulating in PIC24.
http://www.microchip.com/stellent/idcpl ... e=en530593
Who can help me to integrate that example into FC project correctly? We can chat over icq or skype.
http://www.microchip.com/stellent/idcpl ... e=en530593
Who can help me to integrate that example into FC project correctly? We can chat over icq or skype.
FC 6.1.3.2 (18.02.2016)
-
- Flowcode v5 User
- Posts: 211
- Joined: Tue Feb 19, 2013 9:51 pm
- Has thanked: 72 times
- Been thanked: 177 times
- Contact:
Re: Writting to flash on PIC
To answer your original question, yes it can be done but your right, asm or 'c' code will have to be used. Below is a conceptual program (no asm or 'c' code included) on how the write portion might be done using Flowcode. There are probably errors in it. There also may be enough information in the device data sheet to add the asm or 'c' code. The flash read portion looks like it would be a lot easier. I wish I could help you further but, I only have the 'free' PIC16 Chip Pack and I do not have any hardware to proceed.
- Attachments
-
- EE_PROM_Writer_v1.fcfx
- Concept only, not a working program
- (7.33 KiB) Downloaded 269 times
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
your example seems to be for external memory with i2c interface, doesn't it?
still looking for someone to help me with writting to flash. as a result i need two macros read and write from and to flash. data to store: several variables (50-100 bytes of data). maybe someone can offer payable support?
still looking for someone to help me with writting to flash. as a result i need two macros read and write from and to flash. data to store: several variables (50-100 bytes of data). maybe someone can offer payable support?
FC 6.1.3.2 (18.02.2016)
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
still looking for someone who can create two macros to write and read from pic24 flash memory. I am ready to pay some money for the work time, if necessary.
FC 6.1.3.2 (18.02.2016)
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Writting to flash on PIC
Hello,
Have you seen this topic, not specifically for the PIC24 but might help to get you on the right track.
http://www.matrixtsl.com/mmforums/viewt ... 26&t=15067
Have you seen this topic, not specifically for the PIC24 but might help to get you on the right track.
http://www.matrixtsl.com/mmforums/viewt ... 26&t=15067
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
Reviewed the code. but C is not my "native" language, so I will need help anyway.
FC 6.1.3.2 (18.02.2016)
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
still looking for someone who can create two macros to read and write to program memory of pic24.
I need to store 300 bytes of data (settings and so on). So macro must read and write byte by byte or by whole block (so I could read 300 bytes buffer, modify and write back).
Can pay some money for the work if necessary.
Please PM.
I need to store 300 bytes of data (settings and so on). So macro must read and write byte by byte or by whole block (so I could read 300 bytes buffer, modify and write back).
Can pay some money for the work if necessary.
Please PM.
FC 6.1.3.2 (18.02.2016)
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
up. still actual. no one can do this? unbelievable
FC 6.1.3.2 (18.02.2016)
Re: Writting to flash on PIC
the weather is to pretty for thinking about how this must go on with pic24
i wait for a raining cold autum day for this doing .. and then goes on
..
..
Best wishes!
Rudi
"unbelievable"
but true
i wait for a raining cold autum day for this doing .. and then goes on
..
..
Best wishes!
Rudi
"unbelievable"
but true
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Writting to flash on PIC
Hello Mikn,
Do you have a specific chip in mind.
I can have a go at creating a set of macros that should work for you but it's pointless without specifics as the PIC24 range varies quite a bit from device to device.
Do you have a specific chip in mind.
I can have a go at creating a set of macros that should work for you but it's pointless without specifics as the PIC24 range varies quite a bit from device to device.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Writting to flash on PIC
Hello Mikn,
I was chatting to Jac Kersing and he said he is currently looking into this functionality for you so I have left it to him for now. To be honest it's been a crazy busy week so far.
I'll keep checking back and if your still waiting in a week or two then I will dig in and see if I can do the component code.
The code itself to read/write is quite easy but to do things properly you need to allow for a way of storing bytes in a page while you do a page erase.
I was chatting to Jac Kersing and he said he is currently looking into this functionality for you so I have left it to him for now. To be honest it's been a crazy busy week so far.
I'll keep checking back and if your still waiting in a week or two then I will dig in and see if I can do the component code.
The code itself to read/write is quite easy but to do things properly you need to allow for a way of storing bytes in a page while you do a page erase.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- mikn
- Posts: 209
- Joined: Mon Mar 03, 2014 10:11 pm
- Has thanked: 54 times
- Been thanked: 41 times
- Contact:
Re: Writting to flash on PIC
I see that the code is simple, according to the example from microchip. But C is not my "native" language and I have troubles with correct injecting this code into Flowcode project. That's why I am asking for help. If you tell me that it will be done, I can wait for a week, of course.
FC 6.1.3.2 (18.02.2016)