2 interupts - portb.0 rising and falling edges


Results 1 to 8 of 8

Threaded View

  1. #5
    EDWARD's Avatar
    EDWARD Guest


    Did you find this post helpful? Yes | No

    Default thanks for the reply

    sorry that wasnt my whole program, just an idea of how it was stuctured.

    well time is actually very critical as the paintball marker can fire 35+ balls per second. my program is very long ( just under 4k) because i had to create my own lcd subroutines. when i use the on interupt command, my program becomes very large. i try using the enable and disable commands so that only the top 2 subs are enabled and every thing below is is disabled to intertupt.
    i need it to work on edges becuase if i do something like:

    loop:
    if portb.0 = 1 then
    gosub fire
    endif
    goto loop


    the paintball marker will fire in full auto. i could correct this using a variable to hold the state but i was thinking that the interupts would be better.

    i now have 2 loops. with out getting to involved, 1 loop is for rising edges, 1 loop is for falling edges. and when the condiotion is met to switch loops, it change the option_reg.6 from 1 to 0.

    but,for some wierd (but benifitial to me) reason, when i set the option_reg.6 = 0 it will read both rising and falling tansitions, instead of just falling. which is exacly what i needed.

    i need about 1ms reaction time max for my application. my prject is very complex the way it works. my goal is not to make a paintball gun just fire. it is to make it functin a very very specific way. a requirement that is in the tournement handbook.
    Last edited by EDWARD; - 8th July 2005 at 22:55.

Similar Threads

  1. Interrupt On both (Rising and Falling)
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 12th March 2008, 14:34

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