PIC to PIC UART Communication Problem

Discussion in 'Embedded Systems and Microcontrollers' started by mirrayhan08, Dec 16, 2016.

  1. mirrayhan08

    Thread Starter New Member

    Mar 24, 2012
    6
    0
    Hi,
    I am facing the same problem with PIC to PIC communication with UART. I was trying to display the received data through the UART but it does not work. Please check the attached image.

    [​IMG]
    It will be appreciated if anyone helps me do figure out how can I transfer a string from PIC16F73 to PIC18F4550 then display on the LCD.

    I am using MikroC Pro and Proteus 8.
     
    Last edited: Dec 16, 2016
  2. JohnInTX

    Moderator

    Jun 26, 2012
    3,640
    1,873
    Welcome back.
    You posted to a very old thread with your own question. It is preferred that you start a new thread with each new question. I have moved your question to a more suitable forum.
    Ref post: http://forum.allaboutcircuits.com/threads/pic-to-pic-uart.66399/#post-1073212

    Please tell us what is not working.. Have you initialized the LCD display? Do you get anything on the display at all? Does it work with just one character sent?

    Post your code using CODE tags (see menu above the reply window) for both PICs.
     
  3. mirrayhan08

    Thread Starter New Member

    Mar 24, 2012
    6
    0
    Hi Johnla,
    Thank you for your reply.
    Actually, I wanted to do transmit some string from (16F73) to (18F4550) using RF. After that, I will use this data for switching for some LEDs. ex: ON-LED-ONE something like this. For your help, I am uploading the Tx/Rx code with Proteus design file. Please let me know if you need any help or information. Also, I don't want to use any encoder/decoder IC in this project.
     
  4. Stuntman

    Senior Member

    Mar 28, 2011
    213
    55
    Have a scope? See if you are getting transitions (every second) on the TX pin on the source mcu (16F73).

    Setting up UART (Rx and Tx) requires setting up a number of registers. Microchip does a great job of laying this out in their datasheets. I notice you use some function (seemingly) included with your particular compiler., you may debug to make sure the settings of these registers reflect the datasheet.
     
  5. Art

    AAC Fanatic!

    Sep 10, 2007
    805
    62
    Hi :)

    For 16F73 you have tris for the transmit pin set as an input,
    and the same for 18F4550, with a comment saying txrx must be input.

    I suspect enabling hardware UART might disconnect the ports internally,
    so that it doesn’t matter, but why is it needed to define them as inputs?

    Also you don’t appear to be flashing the LED on RB0 of the 16F73 to be sure it’s clocking at all.

    I take it you can make the LCD print?
    and that you have defined the two different clocks, 8 & 16 MHz in both programs?
     
Loading...