PWM and MEMORY


Results 1 to 34 of 34

Thread: PWM and MEMORY

Threaded View

  1. #25
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: PWM and MEMORY

    you only need the "endif" if the "if" statement takes up more than one line...

    IF A=B THEN dosomething

    versus...

    IF A=B THEN
    dosomething
    ELSE
    IF B>A THEN
    dosomethingelse
    ENDIIF

    And as far as your question to Jersen...
    It looks to me that he is just having the code check the stored value in EE memory only on power up (or after a reset).
    You would not need to keep checking the stored value in EE every time the program loops
    You only wanted to retrieve the last stored value on power up so it does not need to be in the Main block.


    check the PBP manual for the IF statement...

    5.35 IF..THEN
    IF Comp {AND/OR Comp...} THEN Label
    IF Comp {AND/OR Comp...} THEN Statement...
    IF Comp {AND/OR Comp...} THEN
    Statement...
    {ELSEIF Comp {AND/OR Comp...} THEN
    Statement...}
    {ELSE
    Statement...}
    ENDIF

    hope this helps
    dwight

    Nice lab!!
    lets see the other half (or is that where all the dead bodies are)
    Last edited by Heckler; - 13th May 2016 at 21:43.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Similar Threads

  1. Replies: 1
    Last Post: - 4th March 2013, 21:57
  2. Replies: 11
    Last Post: - 17th August 2010, 16:45
  3. Memory use - how much do you use?
    By keymuu in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 10th June 2009, 22:39
  4. Replies: 4
    Last Post: - 2nd March 2007, 06:12
  5. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38

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