PIC uart basics


Closed Thread
Results 1 to 8 of 8

Thread: PIC uart basics

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    The hardware UART will buffer up to 2 incoming bytes automatically. Just set it up, enable
    it, and read data from the buffer before the 3rd byte is received.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2


    Did you find this post helpful? Yes | No

    Default

    So it does or does not work in the background?

    What I mean is once you write a HSERIN command it will always write to the register you specify?....then just sample the register when you want?

    Or will it only write to the registers once and wait till you do another HSERIN? (or Hserout, whatever the case may be).

    I was under the impression the hardware Uart works like that....independently.

    ?

    Thanks.

  3. #3
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    I also have been toying with the USART and I think had a misconception of what "in the background" meant. I've come to believe it means the USART will suck in two bytes at any time they arrive as long as the buffer is empty. This gives you some time to get there and read them, thus emptying the buffer for another two bytes to arrive. I use the Receive interrupt because I'm receiving 5 bytes at a time. If your program is fast enough I would think you could just poll the RCIF and grab a byte at a time.

    I could be way off here but I'm still learning too.
    "It will never happen here!" just happened here.
    My thoughts and prayers for Sandy Hook victims and families.

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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