Instant Interrupts and HSERIN


Results 1 to 27 of 27

Threaded View

  1. #1
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    94

    Question Instant Interrupts and HSERIN

    Hi,

    I've been struggling with this for around a week so I thought I'd check here to see if anyone's got any pointers.

    I am collecting some data sent once per minute serially at 9600 baud. A startbyte is sent as $FD followed by 6 bytes representing SS:MM:HH DD:MM:YY

    The following code works right at the start of my program
    Code:
    hserin [wait ($FD), str databyte\6]
    but implementing Darrel's Instant Interrupts and the RX_INT I only seem to capture 2 of the bytes of data being the MM and HH so if write:

    Code:
    @   INT_DISABLE  RX_INT                                ; Disable RX Interrupt 
    hserin 100,timeout [databyte(1), databyte(2)]
    @   INT_ENABLE  RX_INT                                 ; Enable RX Interrupt
    @   INT_RETURN
    where timeout just re-enables the RX_INT and then returns. I would have expected the above snippet to save the $FD and then the SS data packet so I'm not sure why it skips these two and saves the MM and HH data bytes


    If I try to capture more than two bytes:

    Code:
    hserin 100,timeout, [databyte(1), databyte(2), databyte(3)]
    the hserin just jumps to timeout every time. I am ONLY enabling RX_INT at the moment so that I could eliminate interference by any other Interrupt but this has made no difference.

    Any help would be greatly appreciated

    Thanks in advance

    Rob
    Last edited by Rob; - 10th March 2008 at 19:47. Reason: Spelling mistake - I blame the keyboard!

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