READ WRITE not working consistantly on 12f675


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Does that mean that I need to have a 10ms pause after the write instruction to make it wqork correctly?

    Ill do some research on what you mean by PULSIN 'swing'.

    For this part, I want to run an engine at a certain rpm and then do a PULSIN to get the time between triggers. When I press a button, I want to save that value to compare later. Then it continuosly does PULSIN and compares the saved value with the new one, if its a smaller value, then the rpm is higher and I turn on a light. If the value is larger then the rpm is slower and the light goes off. My problem SEEMS to be that it doesnt save the value correctly or not at all when power is removed. So even if not real accurate, the value should change.

    The rewrite was put in to make sure the write happened do to it not saving correctly. I guess this is not the case so it can be removed.

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink PHYSICS Problem ...

    Hi, Soucoupe

    Quote Originally Posted by sccoupe View Post
    Does that mean that I need to have a 10ms pause after the write instruction to make it wqork correctly?
    NOT necessary ... PBP cares for you ...

    That means it happens things WHILE Eeprom Writing ...


    Ill do some research on what you mean by PULSIN 'swing'.
    You only could find that with " rollover" keyword ... old logics users have learnt it was 0 or 1 state ... if number is between ... result woes a bit !!!

    For this part, I want to run an engine at a certain rpm and then do a PULSIN to get the time between triggers. When I press a button, I want to save that value to compare later. Then it continuosly does PULSIN and compares the saved value with the new one, if its a smaller value, then the rpm is higher and I turn on a light. If the value is larger then the rpm is slower and the light goes off. My problem SEEMS to be that it doesnt save the value correctly or not at all when power is removed. So even if not real accurate, the value should change.
    YOUR problem is the RPM value is slightly changing with time ( due to the combustion engine working principle ...) , despite you think it's a constant speed ... actual value is 1500 +/- 50 rpm. ( Example )

    My model plane engines run @ XXXXX rpm ... +/- 100 rpm ...

    Sooooo ... PULSIN will return a slightly and slowly changing value AROUND a steady value !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Feb 2009
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    I realize that the rpm is not constant, but im not saving it all of the time in any case. For instance, If I save a PULIN value for 400rpm and then change it to 6000rpm and reboot the pic, it may keep the old 400rpm value. Very inconsistant the way it works.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Cool

    Quote Originally Posted by sccoupe View Post
    I realize that the rpm is not constant, but im not saving it all of the time in any case. For instance, If I save a PULIN value for 400rpm and then change it to 6000rpm and reboot the pic, it may keep the old 400rpm value. Very inconsistant the way it works.
    Please ...

    Provide Your Full code ... AND Your electrical scheme. ( Even PM if confidential ...)

    Will be MUCH easier to debug than supposing things ...

    Alain
    Last edited by Acetronics2; - 19th September 2009 at 16:18.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. write -read problem?
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th August 2009, 13:06
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  4. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  5. 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

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