1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Two MicroControllers

Discussion in 'Microcontrollers' started by Eng.Remon, May 28, 2007.

  1. Pommie

    Pommie Well-Known Member Most Helpful Member

    Joined:
    Mar 18, 2005
    Messages:
    10,161
    Likes:
    340
    Location:
    Brisbane Australia
    This could be done just using the hardware UART. By using a diode AND gate you can have two slave processors outputting to one master.

    I.E.
    [​IMG]

    TX3 can connect directly to RX1 and RX2. Processor 3 would then request data from the 2 slave processors.

    Mike.
     
    Last edited: Jul 6, 2008
  2. Eng.Remon

    Eng.Remon New Member

    Joined:
    Dec 13, 2006
    Messages:
    50
    Likes:
    0
    Location:
    Eg.
    i think of using max232 wid rs232 is dat would be good?
    but i need some help to understand how the serial mode is working on transmitter and reciever?
     
    Last edited: Jun 10, 2007
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    My RS232 PIC tutorial explains it, you don't need MAX232's if you're just talking from micro-controler to micro-controller.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Eng.Remon

    Eng.Remon New Member

    Joined:
    Dec 13, 2006
    Messages:
    50
    Likes:
    0
    Location:
    Eg.

    what about the voltage converstion!? 3<->5
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    Was it ever mentioned that it was two different voltages?.
     
  7. Eng.Remon

    Eng.Remon New Member

    Joined:
    Dec 13, 2006
    Messages:
    50
    Likes:
    0
    Location:
    Eg.
    yea what i got from a reference that the uc works on ttl vorltage 5 v and the Rs232 works on 3 volt so the max232 is used to make this convergence
    isnt that right ?!
     
  8. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    No it's not - TTL is 0-5V, RS232 is -12V to +12V.

    If you're going from PIC to PIC you just need to connect the 5V levels.
     
  9. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Recap.

    To send or receive serial data you need a UART.

    The UART can be either hardware or software.

    If it is hardware it can be built in to the microcontroller, or it can be an external chip.

    If it is software, it is code that runs on the microcontroller, aka bit-bang code.

    The UART logic level is that used by the processor, most often 0V and 5V. At least 3 wires are needed at each UART. RX, TX and a GND. This is all that is needed with no flow control or software flow control

    To get the signal to travel further then possible with 0V and 5V you can use an RS232 level shifter. It converts the 0V/5V to +12V/-12V.

    HTH
     
  10. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,324
    Likes:
    653
    Location:
    Derbyshire, UK
    I don't like to complicate matters :p but this isn't strictly true, with micro-controllers, and a software UART, you can do it with just ground and a single I/O pin, a combined tx/rx - switched between tx and rx in the software. Obviously, unless you're short of pins, it makes more sense to use seperate ones - but it's perfectly capable with just the one I/O pin if needed.
     
  11. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I know that, you know that, and the OP is having difficulty getting his head around basic concepts... :p:p
     
  12. Eng.Remon

    Eng.Remon New Member

    Joined:
    Dec 13, 2006
    Messages:
    50
    Likes:
    0
    Location:
    Eg.
    oh, thnx 3v0 but i dont think u know everything Right!!. at least i m trying to learn. thnx All who Cares
     
  13. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    I am sorry if you feel insulted.

    Whatever...
     
  14. Eng.Remon

    Eng.Remon New Member

    Joined:
    Dec 13, 2006
    Messages:
    50
    Likes:
    0
    Location:
    Eg.
    no problem.
    Whatever...
     
  15. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    There are many ways to to what you want to do. What I was attempting to do was to keep it straight forward so you could get where you were going with the least difficulty.

    Many of us here have years of experiance and could provide you with many ways doing this. That would be confusing to most anyone attemping to get his/her head around the basics.
     

Share This Page