Internal eeprom - erase block


Closed Thread
Results 1 to 33 of 33

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by BrianT View Post
    What this is saying is that the first 4k locations are 'high endurance' (and probably physically larger). The remaining 28k bytes are 'standard endurance'.

    Just make sure your code always starts to store data from address 0 so the low adfdresses get most writes and the highest see less writes.

    HTH
    Brian
    Hi Brian,


    What it says is clear.

    The thing is, for standard block, it says 1M cycle at the beginning, but 100K cycle at the end of the statement. Read it again!



    ---------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Nov 2007
    Location
    Cebu, Philippines
    Posts
    14


    Did you find this post helpful? Yes | No

    Default read eeprom problem

    Hi everyone!

    I'm using PIC16f877a and I program it this way:

    'PIC DEFINES
    '--------------------
    @ DEVICE pic16f877a, XT_OSC
    @ DEVICE pic16f877a, WDT_ON
    @ DEVICE pic16f877a, PWRT_ON
    @ DEVICE pic16f877a, BOD_ON
    @ DEVICE pic16f877a, LVP_OFF
    @ DEVICE pic16f877a, CPD_OFF
    @ DEVICE pic16f877a, PROTECT_OFF
    @ DEVICE pic16f877a, WRT_OFF

    'LCD DISPLAY
    '--------------------
    DEFINE LCD_DREG PORTA
    DEFINE LCD_DBIT 0
    DEFINE LCD_RSREG PORTA
    DEFINE LCD_RSBIT 4
    DEFINE LCD_EREG PORTE
    DEFINE LCD_EBIT 2
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    'DEFINE LCD_COMMANDUS 2000
    'DEFINE LCD_DATAUS 50

    ADCON1=7

    prnt var byte[2]

    TRISB=%00000000
    TRISC=%00000000
    TRISD=%00000001
    CMCON=%00000111
    'CVRCON=%0000000
    OPTION_REG.7=0

    EEPROM 0,[1]
    EEPROM 1,[8]

    lcdout $fe,1,"Reading eeprom"
    read 0,prnt[0]
    read 1,prnt[1]
    lcdout $fe,1,"Reading=",#prnt[0],#prnt[1]

    end

    When I load the hex file I can see the values 1 and 8 stored in eeprom address 0 and 1 respectively.My problem is that it can't read those values. the lcd will just display "Reading=00".Please help me

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Try this for grins, same thing but different...

    Code:
    loc0 var byte
    loc1 var byte
    .................
    write 0,1
    write 1,8
    lcdout $fe,1,"Reading eeprom"
    read 0,loc0
    read 1,loc1
    lcdout $fe,1,"Reading=",DEC loc0,DEC loc1
    end
    Should say "Reading=18" when it's run.

  4. #4
    Join Date
    Nov 2007
    Location
    Cebu, Philippines
    Posts
    14


    Did you find this post helpful? Yes | No

    Unhappy i'll try

    I also got problem writing the eeprom. I program it this way:

    lcdout $fe,1,"writing the eeprom"

    write 0,2
    write 1,3
    pause 2000

    lcdout $fe,1,"Successful!"

    end

    The output is terrible.It will just make the lcd display "writing the eeprom" and it will keep on refreshing...
    Please help me...

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Use a STOP or an endless loop before the END statement.
    Code:
            pause 2000
            lcdout $fe,1,"Successful!"
    Here:   GOTO Here 
    end
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Nov 2007
    Location
    Cebu, Philippines
    Posts
    14


    Did you find this post helpful? Yes | No

    Default thanks

    Thanks steve.
    I'll try this.

  7. #7
    Join Date
    Nov 2007
    Location
    Cebu, Philippines
    Posts
    14


    Did you find this post helpful? Yes | No

    Unhappy Still won't work

    Hi Steve!

    I placed an endless loop before the END, but still i got the same output.
    What should I do?
    Please help...

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. config bits
    By brianD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th February 2010, 13:45
  3. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 00:55
  4. PortE problems (PIC18F4455)
    By RubenR in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 12th July 2006, 15:26
  5. 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

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