How instant are Instant Interupts?


Closed Thread
Results 1 to 29 of 29

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    jmgelba , These lines will never execute because of the value of "A" before hand.

    if (A <=4) THEN <<<<<<<<<<<<<<<<<<<<<<<<< here A = 6
    GOTO loop
    if (A = 5) then 'if A=5 fets are still on <<<<<<<<<<<<<<<< here A = 6
    pauseus 1500 'set max time for fets to be on
    PORTB = %00000111 'turn off fets

    Also wheres the ENDIF's?

    Dave Purola,
    N8NTA

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Why would A = 6?

    Before the goto, A is set to 0, then I'm counting up. If A becomes less than or equal to 4 something happens. If A = 5 then something else happens.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    jmgelba, Because "While" it is the loop A is being incremented until it equals 6 right?

    Dave Purola,
    N8NTA

  4. #4
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    I thought I was incrementing it until it reached 5? If its equal or less than 4 (>=4) is does something, if it is =5 than it does something else. After it has reached either of those conditions it shouldnt increment again.

  5. #5
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    So could this be used?

    Repeat
    PORTB = %00000111
    Until
    PORTA.0 = 1

  6. #6
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    jmgelba, Yes it could... You understand why the counter = 6 dont you?

    while A <= 5 'follow status of i/p turn off fets if i/p goes away
    PORTB = %00001100
    A = A + 1
    IF (PORTA.5 = 1) THen
    PORTB = %00000111
    WEND

    Because if A = 5 you still increment A. Right? So when you drop out of the loop A = 6..

    Dave Purola,
    N8NTA

Similar Threads

  1. DT's instant interupts compile problem
    By comwarrior in forum General
    Replies: 4
    Last Post: - 18th October 2009, 19:30
  2. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  3. Instant interupts
    By Sneaky-geek in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2009, 19:18
  4. DT Instant Interrupt counting
    By jderson in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 9th March 2008, 22:47
  5. Instant Interupts with a 12f675
    By wlundonly in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 26th January 2008, 01:52

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