LCD freezing problem with interrupts


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: LCD freezing problem with interrupts

    Completely unrelated to your problem, or perhaps not but anyway.....
    Does these constructs really work? Do they even compile:
    Code:
    ' FWD/RWD button
    IF PORTC.1=%1 THEN
       IF rot=%0 AND run=%0 AND flag4=%0 THEN rot=%1:flag2=%0:flag4=%1
       IF rot=%1 AND run=%0 AND flag4=%0 THEN rot=%0:flag2=%0:flag4=%1
    ENDIF

    I think you need an ENDIF for each of those IF statements.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: LCD freezing problem with interrupts

    Quote Originally Posted by HenrikOlsson View Post
    Completely unrelated to your problem, or perhaps not but anyway.....
    Does these constructs really work? Do they even compile:
    Code:
    ' FWD/RWD button
    IF PORTC.1=%1 THEN
       IF rot=%0 AND run=%0 AND flag4=%0 THEN rot=%1:flag2=%0:flag4=%1
       IF rot=%1 AND run=%0 AND flag4=%0 THEN rot=%0:flag2=%0:flag4=%1
    ENDIF

    I think you need an ENDIF for each of those IF statements.
    I've no problems with that (but I've modified this part to something like that):

    if rot=%0 then
    if run=%0 then
    if flag4=%0 then
    rot=%1
    flag2=%0
    flag4=%1
    endif
    endif
    endif

    Yeah, not very readable but take less program space than AND operator. And it works good.

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