PIC programming

Discussion in 'Embedded Systems and Microcontrollers' started by digital, Dec 4, 2007.

  1. digital

    Thread Starter Member

    Nov 26, 2007
    11
    0

    can anyone tell me how to transmit and receive a character using USART inPIC16F877A..
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    We discourage posters jumping in on an existing thread. Please start your own.

    The spec sheet for the USART will have the conditions that will allow the PIC to transmit data through the device.
     
  3. eeboy

    Active Member

    Sep 27, 2007
    90
    1
    To transmit simply load the TXREG register with the byte you want to send out. This assumes you have set up the USART properly and TXEN is set.

    To receive (when RCIF indicates you have a byte) simply grab the contents of the RCREG register.
     
Loading...