HSERIN using EUSART RX interrupt - how does it really work?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,714


    Did you find this post helpful? Yes | No

    Default Re: HSERIN using EUSART RX interrupt - how does it really work?

    Actually, my program works on a 8MHz basis - it should be more than enough to handle 9600bps serial data, no?
    probably not , on interrupt is not suitable for processing async data streams in any useful way without flow control
    if there is a "real" foreground task being processed incurring data loss is inevitable

    Since you refer to it, why is there a buffer of "2" characters? What's its use?
    a simple fifo buffer gives you a little bit more time to process the rx data without loss
    @9600 its about 100uS at best

    I will always have unknown data length (I'll read sms messages)
    to approach a task like that you need to have a good understanding of what the message data will look like
    eg is there a start chr? is there and end chr eg /n or /r , does the message have its length encoded in it? is there a chksum or crc
    what is the maximum and minimum length

    there is zero benefit in having an isr capture one chr at a time then immediately pass it back to the foreground task.
    your isr would ideally allow the foreground tasks proceed unhindered by the rx process until a message was
    received and ready to process


    dt ints is not difficult the forum abounds with examples
    Warning I'm not a teacher

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    960


    Did you find this post helpful? Yes | No

    Default Re: HSERIN using EUSART RX interrupt - how does it really work?

    Thanks Henrik, thanks Richard.

    I have some homework to do following your info
    Roger

  3. #3
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: HSERIN using EUSART RX interrupt - how does it really work?

    I assume you already found this, but several members compiled a book on using DT Interrupts:

    http://www.picbasic.co.uk/forum/forumdisplay.php?f=41

    Just in case you haven't seen it.

Similar Threads

  1. Need help: hserin, serin and serin2 does not work for me
    By PerlNoerd in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd February 2014, 22:09
  2. HSERIN + interrupt
    By tacbanon in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 21st April 2012, 15:37
  3. HSERIN with/without interrupt
    By macinug in forum Serial
    Replies: 3
    Last Post: - 19th January 2009, 18:03
  4. HSERIN doesn´t work
    By wurm in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th July 2007, 15:23
  5. USB and Interrupt - can it work together ?
    By Shamir in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd October 2006, 23:24

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