DT interrupts - High to Low


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48

    Default DT interrupts - High to Low

    the code works, but _B0 is started then PORTB.2 Low to High,
    i need High to Low


    i tryed
    DEFINE LVDINT = PORTB.2
    and
    DEFINE HLVDINT = PORTB.2

    but not work


    Code:
    Button var PORTB.2
    
    ASM
    INT_LIST  macro   ;IntSource,   Label,         Type, ResetFlag?
       INT_Handler    INT2_INT,     _B2,     Asm,  Yes   
       INT_Handler    RX_INT,       _Rx,    Asm,  Yes
       Endm
    
       INT_CREATE
       INT_ENABLE INT2_INT
       INT_ENABLE RX_INT
    ENDASM
    
    .....
    
    B2:
       IF Button    = 0 then
          hserout["0"]
       else
          hserout["1"]
       endif
    Fim:   
    @ INT_RETURN
    
    
    Rx:
       hserout["Rx"]
    Fim:   
    @ INT_RETURN
    ..: Don't worry, be happy :..

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'm not sure I understand what you mean, you mean you want the INT2 interrupt to trig on the falling edge of PortB.2?

    Anyway, one problem might be that you declare the ISRs as ASM but then you write them in BASIC. It will also be easier for people to help you if you tell us which PIC you're using.

    /Henrik.

  3. #3
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48


    Did you find this post helpful? Yes | No

    Default Solved

    many thanks.....


    i used
    INTCON2.4 = 0 ' PORTB.2 - Lo to Hi
    and works 100%
    ..: Don't worry, be happy :..

Similar Threads

  1. SERIN MIDI out of Synch?
    By jncortes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2009, 20:08
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Pic16f84 and RC5 kode
    By terminator in forum Bluetooth
    Replies: 5
    Last Post: - 18th June 2007, 21:40
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37

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