MCU master and slaves uart

Discussion in 'Embedded Systems and Microcontrollers' started by FroceMaster, Feb 20, 2016.

  1. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    Can i connect these MCU in this way

    i will only have to send info to the slaves, nothing return.
    aurt serie.png
  2. Papabravo


    Feb 24, 2006
    With all questions, such as this, you need to read the datasheet carefully. In the datasheet you will find a wealth of information on the driving capability of processor outputs. In your case you need to be concerned with the ability of your one output to drive a capacitative load at the baudrate you intend to use. Are all the processors on one board in close proximity or are they spread out on a factory floor. These details make a huge difference. Once you have made a hypothesis about the situation you need to test it to verify it, or seek additional information if you fail to verify it.
    JohnInTX likes this.
  3. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    Have not found in datasheet how many i can connect.
    all mcu will be around 15 cm from master, on same PCB,.
    speed is not that importain, so i think baud at 300 should do it.
    Someone must be able to say if it Works, cant be that i am the only one that planed to do so.
  4. shteii01

    AAC Fanatic!

    Feb 19, 2010
    Those look like PIC by Microchip. Email Microchip and ask.
  5. JohnInTX


    Jun 26, 2012
    +1 As it is shown, the PIC UART output will drive all of those inputs but PB's point is important. If these are all closely located it should be OK but if the slaves are connected by lengths of cable you may run into trouble with noise, ground offsets etc. 300 baud removes some of the cable issues but not all. The IO ports are not really line drivers.

    One thing I don't like is no feedback from the slaves that tells the master that the message was received correctly. Presumably these messages are not too important?

    At any rate, be sure to use the weak pullups or an external resistor to pull the comms line high during reset/power up. If you don't, the slaves can receive garbage characters which can cause a receive buffer overflow and shut down the slave's UART until corrected or at least receive bad data.
  6. dannyf

    Well-Known Member

    Sep 13, 2015
  7. NorthGuy

    Active Member

    Jun 28, 2014
    Just in case, the order of the pins on the right side of your drawings is reversed compare to how the pins are located on the real chip.
  8. Picbuster


    Dec 2, 2013
    I can not answer the question but most of the pic's output pin's can handle 10mA.
    One output will be able to drive a lot of Pic inputs. ( put a small resistor(1K) on each input. reason: when one pic dies it should not stop the total system)
    No pull-ups needed.
    But N outputs are not able to drive one input without provisions to make
  9. FroceMaster

    Thread Starter Member

    Jan 28, 2012
    In series ? or like a pull up ?
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    He means in series, so if one (or more) input shorts out the output driving these is not shorted out with it.

    Personally that failure mode would not concern me but to each their own.

    FWIW I once made a test box where one PIC controlled 10 slaves. Each slave could test a unit, and the master reported results and controlled the testing. All fit inside one box perhaps 1' x 1.5' in size. I used the I2C method for communications since data would go both ways. I2C is even less powerful than a regular I/O pin as it uses a pull up resistor rather than a transistor for the high level. The system worked very well without any notable communication failures.
  11. John P

    Senior Member

    Oct 14, 2008
    Rather than worry about a processor failing with its RX pin pulled low, I'd have some slight concern about every processor staying powered. If a processor's power supply is shorted to ground, or isn't driven at all, all the pins of the chip will sink current via the protection diodes, or if the chip doesn't receive Gnd, the pins will be pulled high in similar fashion. It would even be possible for a chip to be powered via the RX line feeding into its power bus via the protection diode, and then no longer being powered if the line goes low. All kinds of strange stuff can happen in a situation like that.

    It might be a useful safety precaution to feed the master processor's TX line back into its RX. Then you can check if every character went out at a readable voltage level. Or, give each slave unit a feedback line to a pin on the master, and have a square wave (or something recognizable) going out on those lines, so the master can verify operation.
    JohnInTX likes this.