Grabbing word from UART buffer


Closed Thread
Results 1 to 2 of 2
  1. #1

    Question Grabbing word from UART buffer

    Hello,

    I wrote a snippet a while back (3yrs) and have recently picked it back up for reuse. I have a UART packing a variable and incrementing a counter before jumping out of an ASM interrupt routine. I want to pick up 2 bytes (1 word ) from the UART receive buffer. At this time I have the code working on grabbing 1 byte. How do i grab 2 bytes from the UART with one interrupt? Is there a special ASM designation to command a double byte transfer from the RCREG buffer into a variable?

    Nick

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Macgman2000 View Post
    How do i grab 2 bytes from the UART with one interrupt? Is there a special ASM designation to command a double byte transfer from the RCREG buffer into a variable?
    You probably don't grab two bytes with one interrupt, unless you want to run the risk of overrun errors and missed data. You can really only grab one byte per interrupt and put those bytes as words in your main program.

Similar Threads

  1. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  2. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  3. Grabbing word from UART buffer
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th August 2008, 23:06
  4. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  5. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15:23

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