EEPROM Variables (EE_Vars.pbp)


Closed Thread
Results 1 to 40 of 80

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    •Adding 'MotorRPM = 127' just before the spin up does work
    The default value was 150, so it seems logical that setting it to 127 would make it run slower.

    And I assume this is just a schematic error ?? Might cause a few problems. Sure confused me for awhile.



    Try the attached program.
    Attached Files Attached Files
    DT

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    I just changed it to 127 so it would be even slower to make it obvious. If I use 150 it has the exact same effect.

    Thanks for spotting the schematic error! The board itself is fine, though.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    BTW, this problem applies to both EE_vars (MotorRPM & PortEngDir) - unless I specifically set them in code they do not get initialized with the default values (150/127 & 0). I know this for the 2nd EE_var because in a later iteration of the same code I do a check on PortEngDir: if it's 0 make the motor spin CCW; else make the motor spin CW. Without the line 'PortEngDir = 0' the motor **always** spins CW after the chip has been programmed more than once.

    Darrel - I missed seeing that you had provided a code file too. I'll try that out tonight after work (and thanks).

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    Darrel - your file works (all except the interrupt handler to reset the motor speed via the rotary encoder's button)! Does that tell you anything more about what's going on?

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    Oops,

    Add this line after the WRITE command in the RotEncBtnPress: handler.

    MotorRPM = MotorRPM_Default
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    It works! Thanks again Darrel.

    Does this mean there's a problem with EE_var? I've used that include in a bunch of projects and love it. For this project, I still have more work to do (possibly with more EEPROM variables) and would ideally continue to use your EE_var if possible. Could this be a problem with my local version of DT_INTS-14.bas (which I had to modify for the PIC16F1825)?

    DT_INTS-14.txt

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: EEPROM Variables (EE_Vars.pbp)

    First off, you should not be modifying DT_INTS-14.
    It even says so in the code that you modified.
    The changes that you made were incorrect (see the comments in DT_INTS-14), but I don't think they would have affected EE_Vars.

    Since I cannot duplicate your problems with the same hardware and software, I can't agree that there is a problem with EE_Vars.
    It all works perfectly here.

    You don't have any way to debug your program/hardware, no LCD, the USART pins are used for other purposes.
    So you are left to make guesses on what is happening, and I can't ask you to check register values.
    Naturally, those guesses point blame at everything you didn't do. It's human nature.

    I would recommend building in some form of debugging capabillity in your next project.
    A serial LCD that only uses one pin can be extremely usefull.

    With that said, there have been many changes to PBP since I wrote EE_Vars, and much of it's functionality is now included in the compiler.
    So there's not much reason to use EE_Vars anymore.
    DT

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. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  3. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  4. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

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