Problem with RAC_INT


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Thanks Bruce, your suggestion worked. Setting IOCA.4 = 1 enabled the change on porta interrupt to function properly. I have a switch on porta pin 4. The interrupt works for both on-switching and off-switching.

    Of course, each time the interrupt is used 2 seconds is added to the clocked time because of the delay inside the handler. In the real program I don't want this happening. This interrupt will only be used once. After it occurs this interrrupt can be disabled. I then want to jump to another program loop. I'll try some experiments to see if this can be done ...

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hi Dick,

    If the user will not be pressing & holding the switch, then read the port pin after the 2 sec
    pause.

    Otherwise you need to wait for the pin to return to the non-button-pressed state or it just
    interrupts again after the port read & switch release.

    If it's a one-shot deal, just disable it by clearing IOCA.4.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Feb 2010
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    I intend to use the IOC too, but i'm not sure if i need those:

    DT_INTS-14 for F684.bas
    ReEnterPBP.bas
    Elapsed_INT_RI.bas


    if so, where i find this .bas files?

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Files attached. Rename without .txt to use.
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2010
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Thanks Dick but i'm still having troubles with IOCA over 16f684.

    Because i have not much experience with PicBasic, i have been reading about IOC but don't understad how to implement a basic interrupt on change

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 20:52
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 09:12
  3. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 22:04
  4. Hardware problem or what ?
    By Steve S. in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 4th March 2007, 22:39
  5. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 23:59

Members who have read this thread : 1

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