Receiving and Transmitting Serial data at the same time


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84

    Default Receiving and Transmitting Serial data at the same time

    Hi All,

    I need to build a unit to receive a small amount of serial data at 9600. Examine, change then send it out a second serial port at 9600.

    My problem is a second or third batch of receive data could arrive before the 1st batch has been sent!

    My idea is to use the USART to receive the data into a circular buffer using a ASM interupt routine. Then use PBP to examine and send using SEROUT2. If I keep the ASM routine short I am hoping it won't upset the SEROUT2 timings?

    As usual it sounds too easy!!!

    Any tips or pointers appreciated.

    thanks,
    BobP

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The RXreg and TXreg in a PIC are different, so you can send and receive at the same time without resorting to SEROUT2.

    Or... you could use a PIC with 2 USARTs, like the 18F8722.
    Charles Linquist

  3. #3
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Thanks, original spec was for different baud. Forgot I could use Tx and Rx if baud was same....

    Many thanks,
    Bob

Members who have read this thread : 1

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