Flash programming data in microchip

Thread Starter

electronicsLearner77

Joined May 26, 2012
127
My requirement is to write into flash memory for dspic33ev256gm106 and bit confused with the following instruction
upload_2017-7-20_22-19-31.png

TBLPAG register is loaded with write latch 0xFA0000. My big confusion is what is [W1++] , [W1--] , [W1] in terms of write latch address how does it increment? Also my thinking is that W2 is pointer pointing to 16 bit data is it correct? and W2++ keeps incrementing to next location?
 

Attachments

geekoftheweek

Joined Oct 6, 2013
1,429
W1 is set to 0 which is the 0000 of the address 0xfa0000.
By using [W1] the number in W1 then turns into a pointer like you're thinking for W2
The [W1++] and [W1--] increment or decrement the values in W1 after the read or write operation which then point to the next byte or word in memory.
If I'm not mistaken (I've only worked with one PIC24 device so far) all of the W# registers are capable of being used as pointers this way.
If you've worked with any of the lower families of PICs... it's essentially the same as the FSR registers, but better.
 
Top