Uart communication between two different microcontrollers

Discussion in 'Embedded Systems and Microcontrollers' started by bsrao, Dec 4, 2012.

  1. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    Hi...i want to communicate usart communication between 2 different microcontrollers...what are the hardware conections we have to give for communicating between 2 different microcontrollers...and how to take care in the software part like baudrate must be same for both controllers...? please suggest as i am new to microcontroller programming..

    Thanks in Advance
     
  2. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    i have done a search on net but i am not able to find any thing for communication between 2 different controllers....
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    What is the question?
    Once you set the baud rates to be the same you should not have a problem.
    You have not specified the model numbers of the microcontrollers.
     
  4. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    can u help me in hardware part...how to give connections...do we need any special ic for connecting between 2 mcu other than TTL...
     
    Last edited: Dec 5, 2012
  5. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    No. Connect RXD of one MCU to TXD of the other MCU.
     
  6. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    kk...thnx for your reply..
     
  7. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    one more thing i want to clarify both controllers are of different voltages...will there be any issue in transmitting data if voltages are different...
     
  8. absf

    Senior Member

    Dec 29, 2010
    1,490
    371
    Use MAX232 level shifters on both mcu and that should solve the problem.

    Allen
     
    bsrao likes this.
  9. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    Specify your voltages. You can adapt for different voltages.

    Also, learn to communicate. Why does it take two posts to get your information across?
     
  10. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    sorry for this..from next time i wont repeat it again.....one mcu is operating at 3.3v and the other mcu at 1.8v
     
  11. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    If these 2 micros are on the same board then something like the MAX232 would be overkill. All you'd need is some sort of level shifter between the voltage domains, something like a NLSX4302E 2-Bit 20 Mb/s Dual-Supply Level Translator may work better with less parts.

    However, these are all very modern devices and may only be available in surface mount packages.
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,420
    3,355
    To reduce a 3.3v TXD signal to suit 1.8v RXD input, simply use a voltage divider and/or a diode clamp.

    To boost a 1.8v TXD signal for a 3.3v RXD input, use a non-inverting transistor buffer. A simple solution such as a pullup resistor might work.
     
  13. absf

    Senior Member

    Dec 29, 2010
    1,490
    371
  14. bsrao

    Thread Starter New Member

    Dec 4, 2012
    7
    0
    ernie,absf,mrchips thnx a lot for your reply..i will try this and update here
     
Loading...