need help! to beginner


Results 1 to 28 of 28

Threaded View

  1. #3
    Join Date
    Apr 2009
    Posts
    29


    Did you find this post helpful? Yes | No

    Default I can not stop running of programm when on some point the button is unpressed

    TRISB = %11111111
    OPTION_REG.7 = 0


    loop:

    If PORTB.7 =0 THEN
    Freqout PORTB.0,4,1700 ;------------- air horn
    Freqout PORTB.0,4,850
    Freqout PORTB.0,4,1250
    Freqout PORTB.0,4,425
    Endif




    If PORTB.6 = 0 Then
    Freqout PORTB.0,8,366 ;------------- pulsar
    Freqout PORTB.0,8,483 ;
    Freqout PORTB.0,8,591
    Freqout PORTB.0,8,664
    Freqout PORTB.0,8,760
    Freqout PORTB.0,8,886
    Freqout PORTB.0,8,967
    Freqout PORTB.0,8,1070
    Freqout PORTB.0,8,1182
    Freqout PORTB.0,8,1330
    Endif

    If PORTB.5 = 0 Then
    Freqout PORTB.0,10,366 ;------------- yelp
    Freqout PORTB.0,10,483
    Freqout PORTB.0,10,591
    Freqout PORTB.0,10,664
    Freqout PORTB.0,10,760
    Freqout PORTB.0,10,886
    Freqout PORTB.0,10,967
    Freqout PORTB.0,10,1070
    Freqout PORTB.0,10,1182
    Freqout PORTB.0,10,1330 ---------- how to check? just to say if in this point button is unpressed and stop running
    Freqout PORTB.0,10,1182
    Freqout PORTB.0,10,1070
    Freqout PORTB.0,10,967
    Freqout PORTB.0,10,886
    Freqout PORTB.0,10,760
    Freqout PORTB.0,10,664
    Freqout PORTB.0,10,591
    Freqout PORTB.0,10,483
    Freqout PORTB.0,10,366
    endif


    goto loop
    end
    Attached Images Attached Images  

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. pic24 beginner
    By robertpeach in forum General
    Replies: 23
    Last Post: - 13th August 2009, 11:57
  3. Replies: 10
    Last Post: - 2nd May 2009, 07:42
  4. Beginner trying to use arrays
    By captain in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 3rd November 2007, 07:20
  5. Pic ID Error please help (beginner)
    By ninja in forum General
    Replies: 4
    Last Post: - 11th August 2005, 17:54

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