DATA command not working properly


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Posts
    46

    Default DATA command not working properly

    I have a 16F876 with onboard EEPROM. If I write the following commands

    MyByte VAR Byte
    DATA @0, 12
    READ 0, MyByte

    I get 255 for the value of MyByte. However, if I write the following code:

    MyByte VAR Byte
    WRITE 0, 12
    READ 0, MyByte

    I get 12 for the value of MyByte. It seems that the DATA command is not loading the EEPROM when the program is downloaded.

    Does anyone have any thoughts on this? I could sure use the help.

    Thanks,

    Eric

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


    Did you find this post helpful? Yes | No

    Default

    No problem here, can be programmer setting problem. Wich programmer do you use?
    Steve

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

  3. #3
    Join Date
    Oct 2004
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    I am using melabs serial programmer.

    Is there anything in the configuration file I need to change?

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


    Did you find this post helpful? Yes | No

    Default

    mmm, not familiar with those Melabs... Bruce is certainely the guy for that but, is there any setting in your Melabs Programmer to permit/void to fill eeprom data with the current program data??? Can you access directly to EEPROM within Melabs Program?
    Steve

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

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    With the MeLabs serial programmer, make sure you have it set to program data EEPROM before programming.

    Under Options >> More Options >> Program -- make sure you have a check mark by Data.

    DATA will only place values in EEPROM at program time. WRITE does it at run time.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    Join Date
    Oct 2004
    Posts
    46


    Did you find this post helpful? Yes | No

    Default

    Bruce,

    You hit the nail on the head!!! Your comments fixed my problem. I was at my wits end and had tried just about every option except the one you suggested. I must say, the help menu for the melabs programmer was not a big help in solving this problem.

    Thanks for your help.

    Kind Regards,
    Eric

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 05:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 04:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 15:50
  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