button problems


Results 1 to 4 of 4

Thread: button problems

Threaded View

  1. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    anyway, the reason for your subroutine not working is becuase this statement will never be true: "if yy=2 and portb.7=0 then", becuase you only jump to the subroutine when portb.7=1.

    Instead of this:

    if portb.7=1 then
    gosub flipflop
    endif

    Try just this: "gosub flipflop"

    Also, there is no return from the subroutine... instead of "goto start", put "return"
    Last edited by Kamikaze47; - 22nd November 2005 at 11:10.

Similar Threads

  1. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 09:10
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 03:43
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 23:43
  4. Button Push within 3 second Window
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd December 2005, 11:06
  5. Button subfunction 16F628
    By Jųan in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th August 2005, 17:44

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