Instant Interrupts - Revisited


Results 1 to 40 of 773

Threaded View

  1. #16
    Join Date
    Nov 2008
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Help

    I am using a 16f866 with your instant interrupt but I cannot get it to wake up from sleep using a USART RX int.. If i use a Pause 1 in the main loop it works fine but I would really like for it to go to sleep and just wait. Please let me know what I am doing wrong.. here is the code.. Thank you Darrel for the awesome instant interrupt routines.


    Code:
    Define OSC 8
    
    INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ' Include if using PBP interrupts
    
    ' Set receive register to receiver enabled
    DEFINE HSER_RCSTA 90h 
    
    ' Set transmit register to transmitter enabled
    DEFINE HSER_TXSTA 20h 
    
    ' Set baud rate
    DEFINE HSER_BAUD 2400
    
    x var byte
    OSCCON=%01111000
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler   RX_INT ,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    @ INT_ENABLE  RX_INT      
    
    Main:
    @sleep
    @nop
    GOTO Main
    
    '---[RX-Int - interrupt handler]--------------------------------------------------
    ToggleLED1:
    hserin [x]
    hserout ["Hello"]
    @ INT_RETURN
    Last edited by jchandir; - 31st May 2009 at 01:18.

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 06:32
  5. Replies: 1
    Last Post: - 1st November 2006, 03:11

Members who have read this thread : 8

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts