WRITE data to EEPROM on PIC18F8621


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    Melbourne AUSTRALIA
    Posts
    8

    Default WRITE data to EEPROM on PIC18F8621

    Has anyone had experiance using READ and WRITE on the 18F8621. Using READ I can read the values stored in the EEPROM but I cannot WRITE new values to the internal EEPROM. Why is this? It works on the 16F devices I used in the past.

    I guess this is probably not spacific to this device and assume its due to the migration from 16f to 18f.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dschafer View Post
    Has anyone had experiance using READ and WRITE on the 18F8621. Using READ I can read the values stored in the EEPROM but I cannot WRITE new values to the internal EEPROM. Why is this? It works on the 16F devices I used in the past.

    I guess this is probably not spacific to this device and assume its due to the migration from 16f to 18f.
    What version of PBP?

  3. #3
    Join Date
    Mar 2007
    Location
    Melbourne AUSTRALIA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    PicBasicPro version 2.4.6.0

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dschafer View Post
    PicBasicPro version 2.4.6.0
    Show us the program that's failing you...

  5. #5
    Join Date
    Mar 2007
    Location
    Melbourne AUSTRALIA
    Posts
    8


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Show us the program that's failing you...
    Its a long program, but what i'm trying to do using READ and WRITE is as follows:

    'at the start of the program read these values from EEPROM and place in the variables'

    Read 0, trip_amount[0]
    Read 1, trip_amount[1]

    'so far so good, this works as per usual'

    If S1 = 1 Then
    Read 0, temperary[0]
    Read 1, temperary[1]
    If (trip_amount[0] <> temperary[0]) OR (trip_amount[1] <> temperary[1]) Then
    Write 0, trip_amount[0]
    Write 1, trip_amount[1]
    LCDOut $FE, 1
    LCDOut $FE, $C0 , " SAVING CHANGES"
    Pause 1000
    EndIf
    Goto Menue_2_0
    EndIf

    'I get a SAVING CHANGES on the LCD but the eeprom values dont change'

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    well that should work fine, must be something in the rest of the program that isn't being shown, maybe a variable declaration, changing the variable itself in another part of the program, etc.etc.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 02:46
  3. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  4. Internal EEPROM Read/write Addressing Errors with 18F PIC's
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 18
    Last Post: - 12th July 2005, 19:42
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

Members who have read this thread : 0

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