TX RX Buffer Question


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79

    Default TX RX Buffer Question

    Could someone brefiely explain what and how the TX and RX buffers are on a pic and how one accesses them using PBP.
    I'm interested in this because I want to connect multiple pics together so that they can comunicate with each other. I wanted to try useing i2c bus but I do not fully understand the slave mode function of it. It doesn't sound like microchip does either. haha.
    Just a brief explanation would be greatly appreciated.

    Thanks
    shawn

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    I'm interested in this because I want to connect multiple pics together so that they can comunicate with each other.I wanted to try useing i2c bus but I do not fully understand the slave mode function of it.
    yiiiish... i'm not going to say that's the best way in I2C, IMO it will not work. Some SHIFTIN/SHIFTOUT to *emulate* SPI/Microwire could work BUT, i'll certainely prefer using the simplest way... Serial comm with Internal USART or SERIN/SEROUT statement with some RS485 multipoint driver/buffer or directly using different PIC i/o lines. One can be kinda *server* or *master*. That way you can also use some extra i/o for Flow control too.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default

    TXREG is the USART Transmit Register. If you have the USART configured, and turned ON, sending a byte to this register transmits the byte via the hardware USART.

    RCREG is the USART Receive Register. Bytes received by the hardware USART are stored here.

    You access them with PBP the same way you would with any other internal registers.

    X VAR BYTE
    X = "A"
    TXREG = X ' Send character in X to TX register

    Y VAR BYTE
    Y = RCREG ' Load received data byte into Y from RX register
    Regards,

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

  4. #4
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Thankyou
    Steve and Bruce this helped alot.

    Shawn

Similar Threads

  1. Replies: 67
    Last Post: - 8th December 2009, 02:27
  2. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00:13
  3. RX - TX timming
    By ruijc in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th February 2009, 00:06
  4. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 16:04
  5. Tx and Rx of Single Pin PIC's
    By Dwayne in forum Code Examples
    Replies: 0
    Last Post: - 26th May 2004, 14:55

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