2 interupts - portb.0 rising and falling edges


Results 1 to 8 of 8

Threaded View

  1. #1
    EDWARD's Avatar
    EDWARD Guest

    Default 2 interupts - portb.0 rising and falling edges

    pic 16f73

    portb.0


    is it possible to switch between rising and falling edges interupt. both within the same loop

    loop:

    if risingedge then mysub

    if falling edge then mysub

    goto loop




    if i try

    OPTION_REG.6 = 1 ' rising edge
    INTCON.4 = 1 'enable int <--not sure if necessry
    INTCON.1 = 0 ' reset the interruptflag

    loop:

    'OPTION_REG.6 = 1 'rising edge
    'INTCON.1 = 0 ' reset the interruptflag

    IF INTCON.1 = 1 THEN
    INTCON.1 = 0 ' reset the interruptflag
    gosub fire
    endif

    'OPTION_REG.6 = 0 ' falling edge
    'INTCON.1 = 0 ' reset the interruptflag

    IF INTCON.1 = 1 THEN
    INTCON.1 = 0 ' reset the interruptflag
    gosub fire
    endif

    goto loop

    it wont work
    Last edited by EDWARD; - 8th July 2005 at 03:17.

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