I had the challenge to write a word-array into the eeprom of a 16f628a. And if I am well informed only values from 0 to 255 fit into one "cell" of the 128 cells this pic offers.
I did it this way:
Is there a more efficient way?Code:counter = 0 arraysize = 20 FOR ArrayPosition = 0 TO arraysize-2 STEP 2 Word_Dummy = Array[counter] WRITE ArrayPosition,Word_Dummy.Byte1 counter = counter + 1 Next ArrayPosition counter = 0 FOR ArrayPosition = 1 TO arraysize-1 STEP 2 Word_Dummy = Array[counter] WRITE ArrayPosition,Word_Dummy.Byte0 counter = counter + 1 Next ArrayPosition
Bookmarks