12f675_fuse_about_to_blow!


Closed Thread
Results 1 to 40 of 929

Hybrid View

  1. #1
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Ok.....Mmm...,

    Now we want to control where in the EEPROM data is written to as we will be storing and retrieving multiple pieces of data.
    Well for this I'm thinking (although I could be wrong here):

    Code:
    WRITE 5,B0 ' Send value in B0 to EEPROM location 5
    So we need:

    1/ Total parts run

    2/ Total parts run before M/C stops for maintenance

    3/ How many times M/C shuts down (scheduled + un_scheduled)

    4/ The average amount of parts run between each shut down (scheduled + un_scheduled)

    I think I've read that right?

    Dave

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by LEDave View Post
    Code:
    WRITE 5,B0 ' Send value in B0 to EEPROM location 5
    Yup
    1/ Total parts run

    2/ Total parts run before M/C stops for maintenance For each run, need multiple address here too.

    3/ How many times M/C shuts down (scheduled + un_scheduled)

    4/ The average amount of parts run between each shut down (scheduled + un_scheduled)
    Remember two address locations for WORD size variables.
    Hopefully the machine will run long enough to need a WORD VARs for parts run between shut downs, and if all goes well the machine will not shut down often so a BYTE size VAR should work for "times shut down".
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I'm on it, tricky in parts but I'm on it

    How many EEPROM locations are there on a PIC16F684?

    As in:

    Code:
    EEPROM location 5
    Dave

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I think the 684 only has 256, if I remember correctly.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Is that sequential 0-255?

    Srub that, it's got to be I'm thinking.

    See you tomorrow.

    Dave
    Last edited by LEDave; - 5th May 2010 at 00:52.

  6. #6
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    Hi mackrackit,

    I'm busy working on the latest 'mission'. I'll stick at it and only ask a question when I'm stuck and have given it a good go to figure it out myself.

    I do have one quick question though:

    Can you add or subtract EEPROM memory location values (numbers written to an EEPROM address)? Or do you just give the stored WORD's a name and then subtract the two, something like: Parts_Run = Total - First_Parts_run (if this make sense).

    Dave

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    While the value is in the EEPROM you can not go anything with it. You have to read the value into a variable, do something with it and write it back into the EEPROM.

    I think that is what you are asking...
    Dave
    Always wear safety glasses while programming.

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