EEPROM vs DATA


Closed Thread
Results 1 to 6 of 6

Thread: EEPROM vs DATA

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I've never bothered with EPROM because DATA works nicely for me. The only salient difference I can see is that DATA has the ability to prefix the memory location with a reference LABEL which EPROM doesn't do (or at least it doesn't appear to have this feature - though I've never bothered to find out for myself). Now prefixing a location with a label is very useful, as you then don't have to bother keeping track of EEPROM addresses per se... Example...

    Code:
    	EContrast	Data 2		' Contrast Level
    	EBackLight	Data 2		' BackLight Level
    ... and in your code if you need the Contrast value you can simply...

    Code:
    	Read EContrast,LCDContrast
    Now if you used EPROM to save your data, you would have to keep track that the Contrast was (for example) at EEPROM address 252...

    Code:
    	Read 252,LCDContrast
    ...which just isn't as professional. Apart from that, if you have dozens of items in EPROM, sliding one into the middle of the list is easy with DATA LABELS (because when you recompile the compiler will re-address all your code labels), but if you use EPROM, and you add something into the list before it, then it won't be address 252 anymore, but 253, so it is then up to YOU to go through all your hundreds (or even thousands) of lines of code to make sure that what you have added or taken away from your EPROM list hasn't impacted elsewhere (which it probably would have done!).

    So, DATA usage (with LABELS) is real good, EPROM usage (without LABELS) is amateurish.

  2. #2
    Join Date
    Sep 2007
    Posts
    10


    Did you find this post helpful? Yes | No

    Smile

    Thanks Melanie and scalerobotics

    Your replies helped me very well.

Similar Threads

  1. Data EEPROM gets clobbered during programming
    By BrianT in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2008, 03:46
  2. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  3. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 15: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, 20:42
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 29th November 2004, 00:56

Members who have read this thread : 1

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