Problem with Serin and On Interrupt


Results 1 to 9 of 9

Threaded View

  1. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Using your original example, it might look like this ...
    Code:
    DEFINE OSC 4
    
    DEFINE HSER_RCSTA 90h 'Hser receive status init 
    DEFINE HSER_TXSTA 20h 'Hser transmit status init 
    DEFINE HSER_BAUD 2400 'Hser baud rate 
    
    INTCON.6 = 1          ' Enable Peripheral interrupts
    PIE1.5 = 1            ' Enable USART receive ints (RCIE)
    
    on interrupt goto myint
    
    loop:
        pause 1
    goto loop
    
    disable
    myint:
        Hserin [wait("IB")]
    resume
    enable
    HTH,
      Darrel
    Last edited by Darrel Taylor; - 11th October 2005 at 23:13.

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