Instant Interrupts and HSERIN


Results 1 to 27 of 27

Threaded View

  1. #18
    Join Date
    Aug 2008
    Posts
    66


    Did you find this post helpful? Yes | No

    Question

    I can't seem to receive 8 bytes. I've looked at this post, but still can't solve the problem. The LED is not toggling. If I set to 5 bytes, no problem.
    I've enable rx int in the main loop after I have process the data.

    Code:
    DEFINE OSC 20
    datain var byte[8]
    DEFINE HSER_BAUD 9600 ' Select the baud rate
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 129 ' 9600 Baud @ 20MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically  
    
    
    Int_RX:
    
     HSERIN 100, Timeout, [ STR datain\8]
    
    @    INT_DISABLE   RX_INT
    toggle LED 
    
    @ INT_RETURN    
    
    Timeout:           'serial timeout
    
    @ INT_RETURN
    Last edited by Pic2008; - 27th January 2009 at 15:27.

Similar Threads

  1. Hserin with Instant Interrupts.
    By ronjodu in forum Serial
    Replies: 17
    Last Post: - 30th December 2014, 20:17
  2. HSerin problems on power up
    By Luckyborg in forum Serial
    Replies: 8
    Last Post: - 21st April 2009, 19:49
  3. TMR0 interrupt and HSERIN
    By boban in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd September 2008, 11:48
  4. Usbin and hserin
    By mpardinho in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th October 2007, 15:26
  5. HserIn and Interrupts
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th December 2006, 07:15

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