About writing word variables into the eeprom


Results 1 to 12 of 12

Threaded View

  1. #1
    Ted's's Avatar
    Ted's Guest

    Default About writing word variables into the eeprom

    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:

    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
    Is there a more efficient way?
    Last edited by Ted's; - 29th June 2008 at 12:36.

Similar Threads

  1. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  2. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  3. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  4. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15:23
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts