Write/Read to-from flash

General discussion on mikroBasic for dsPIC30/33 and PIC24.
Post Reply
Author
Message
kingGrey
Posts: 158
Joined: 08 Mar 2007 00:40
Location: portland, OR

Write/Read to-from flash

#1 Post by kingGrey » 24 Nov 2008 20:34

I am using p33FJ1128GP708

It is my understanding that when I declare Const Vraiable, the pic write this data at an offset in Flash. What I would like to to do it to be able to define variables at constants with default declaration. for eg

Const firstStr as String[6] = "OLDER"

Then if I needed to modify this later on, I could use

Flash_Read(address,buffer, size)
Modify this buffer and use
Flash_write(....)

But my question are
- how do I access firstStr by using Flash_Read routine
- after maybe changing the data of firstStr to "Hello", how
would I erase and write this string back to flash memory

any help is appreciated
Thank You for your help
An expert is a man who has made all the mistakes which can be made, in a narrow field.
http://www.stevenswater.com/catalog/stevensProductdl3000.aspx?SKU=%2793750%27

Post Reply

Return to “mikroBasic for dsPIC30/33 and PIC24 General”