Usart with Darrel Instant Interrupt


Closed Thread
Results 1 to 3 of 3
  1. #1
    Pedro Pinto's Avatar
    Pedro Pinto Guest

    Question Usart with Darrel Instant Interrupt

    Hello

    I love the Instant Interrupts to. Is it possible to use it with Assynchron Usart
    In my board i use a 18F452 connected to a RS485 driver circuit MAX487 and
    want to function it with instant interrupt everytime data receibed via the RS485 Network
    How can i do that with Darrel's Instant Interrupts? Have not see any sample code to explain how to do that

    Thanks for help

    Best regards

    Pedro
    Last edited by Pedro Pinto; - 16th February 2008 at 20:48.

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I assume that you want to write your ISR in PBP -
    So, use Darrel's list (part of which is shown below)
    to pick the right interrupt and syntax.


    ' TX_INT -- USART Transmit
    ' TX1_INT -- USART1 Transmit
    ' TX2_INT -- USART2 Transmit
    ' RX_INT -- USART Receive
    ' RX1_INT -- USART1 Receive
    ' RX2_INT -- USART2 Receive
    ------------------------------------------------

    Pick one, then include Instant Interrupts -


    INCLUDE "DT_INTS-18.bas" ; Base Interrupt System
    INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts

    ASM
    INT_LIST macro ; IntSource, Label, Type, ResetFlag?

    INT_Handler RX1_INT, _GetChar, PBP, yes
    endm
    INT_CREATE ; Creates the interrupt processor
    ENDASM


    Goto OverInt

    +++++++++++++++++++++++++++++++++++++++++
    ISR goes here.....

    GetChar:

    HSERIN ...

    @ INT_RETURN
    +++++++++++++++++++++++++++++++++++++++++

    OverInt:

    @ INT_ENABLE RX1_INT - enable the interrupt

    Main Program goes here...
    Charles Linquist

  3. #3
    Pedro Pinto's Avatar
    Pedro Pinto Guest


    Did you find this post helpful? Yes | No

    Default

    Thank you again Charles

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 23:14
  2. Instant Interrupt and USART
    By sirvo in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd July 2008, 04:08
  3. Ping Darrel Taylor - Timer0 Instant Interrupt
    By JEC in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 9th January 2007, 12:20
  4. Replies: 1
    Last Post: - 3rd November 2006, 00:24
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

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