DT_INTS-18 - problem with INT0


Results 1 to 17 of 17

Threaded View

  1. #1
    Join Date
    Feb 2006
    Location
    Brussels, Belgium
    Posts
    104

    Default DT_INTS-18 - problem with INT0

    Hi,

    I'm using DT_INTS to interrupt on INT0 for a PIC 18F4431
    The interrupt works fine but seems to trigger on both arising and falling edge.
    Tried to configure the PIC to only look at the falling edge but it doesn't seem t0 make any difference.

    Here's a snip of the troublesome code, what am I doing wrong ? Is there a parameter inside the DT_INTS I need to set ?

    Code:
    ' set fuses    - USE INC FILE FOR NOW
    
    include "modedefs.bas"        ' serial modes
    INCLUDE "DT_INTS-18.bas"     ' Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas"     ' Include if using PBP interrupts
    
    
    ' ---- setup registers ----------------------------
    ADCON0 = 0 ' A/D off
    ADCON1 = 0
    ADCON2 = 0
    ADCON3 = 0
    ANSEL0 = 0  'digital i/o
    ANSEL1 = 0
    INTCON.4 = 1 'enable INT0
    INTCON2.7 = 0 'pullups on
    INTCON2.6 = 0 ' Int 0 on falling edge of C3
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler   INT0_INT,  _ManualFire,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    
    '---[INT0 - interrupt handler]--------------------------------------------------
    ManualFire:
        Camera_meter = 1
        Camera_shutter = 1
        pause 10
        Camera_meter = 0
        Camera_shutter = 0    
    @ INT_RETURN 
    
    end
    Last edited by AndrewC; - 3rd January 2010 at 19:37.

Similar Threads

  1. 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, 08:12
  2. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04
  3. Real Time Clock & Eeprom
    By smart_storm in forum General
    Replies: 8
    Last Post: - 17th February 2006, 19:03
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

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