EWrite/ERead problem


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2007
    Posts
    3

    Default EWrite/ERead problem

    I try to make my 16f877a remember some variables by storing them in the Eprom. I think this is what ewrite/eread is meant to do.

    The variables are mostly dwords. Once I change one of these variables my code is i.e.

    freq2 = freq2 + step2
    ewrite 0, [freq2]

    freq2 is initialized as
    dim freq2 as dword
    and step2 as
    Symbol step2 = 125

    At startup, I then read the eprom with

    freq2 = eread 0

    Then I check if the value is out of my allowable range. If it is, I set it to a default value. The problem is, obviously no data is written to the eprom, as the default values are set each time at startup.

    I also have a bit variable which I do try to ewrite/eread. I do read that one at startup as well, but do never set it to a default value. This one's not written either obviously as it is always 1 after startup.

    What am I doing wrong?

    Regards
    Martin

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by atlantis View Post

    What am I doing wrong?

    Regards
    Martin
    Posting in the wrong forum?

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    Posting in the wrong forum?

    Nope..

    He is posting in the right forum, just using the wrong language LOL

    If he wants to continue using the wrong language then he should pop over to the wrong forum where they know about that stuff or learn the right language
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by keithdoxey View Post
    Nope..

    He is posting in the right forum, just using the wrong language LOL

    If he wants to continue using the wrong language then he should pop over to the wrong forum where they know about that stuff or learn the right language
    Well, heck if we're gonna go there...who's to say what's right and what's wrong !

  5. #5
    Join Date
    Jan 2007
    Posts
    3


    Did you find this post helpful? Yes | No

    Default

    Well guys tell me what you think the right language and the right forum for it is.

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by atlantis View Post
    Well guys tell me what you think the right language and the right forum for it is.
    The right language (or in this case, compiler) is your choice, the right forum for whatever you are using at the moment is not this one.

  7. #7
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by atlantis View Post
    Well guys tell me what you think the right language and the right forum for it is.
    Tell you, what is the name of your compiler ?
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

Similar Threads

  1. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 21:39
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

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