Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I'm building a DMX device and am thinking about paralleling the workload amongst several microcontrollers. The device has to support 24 PWM channels and I'm afraid, I won't be able to service all 24 channels (software bit angle modulated) in one atmega MCU. Is it possible/right to hook up several Atmegas to listen on the TX line after RS485 receiver or must I put a separate RS485 receiver on every MCU?

My idea is that the first MCU will have an address DIP switch and set addresses to later MCUs via SPI or I2C, then all of them will listen to the same TX line comming from one RS485 receiver and act as they should when they receive their own addresses. (On DMX bus values for all the 512 channels are repeated over and over again)

Is this doable? I think I would have no more than 3 parallel MCUs listening to the same line.

share|improve this question
    
You're not talking about multiple listeners on the serial line itself, but on the output of the receiving UART chip. What part is that receiver? –  Kaz Nov 21 '12 at 1:20
2  
This a simple fan-out calculation. Should be ok..check it –  Tony Stewart Nov 21 '12 at 3:19
    
@Kaz that is some RS485 receiver or transceiver wired as a receiver, like MAX485, LTC485, SN7517, MAX3095. I didn't choose a particular part yet. –  miceuz Nov 21 '12 at 7:52
    
@Richman what fan-out calculation? Could you be more specific? Perhaps as an answer? –  miceuz Nov 21 '12 at 7:54
    
Fan-out calculation: what is the combined impedance of all the multiple circuits being driven by the TX line, and is that high enough for the driving ability of the TX line. (And even if it isn't, that doesn't mean you have to split separate receivers: some simple circuit could boost the TX line's driving ability to handle a larger fanout.) –  Kaz Nov 21 '12 at 22:51
add comment

2 Answers

up vote 1 down vote accepted

If we look at the MAX485 specifically, the datasheet says that the receiver short-circuit current is up to 95 mA. I think we can take this to be an estimate of the driving ability from the RO pin (receive output). If you have three devices listening on this, it's just a matter of the resulting input impedance being high enough so the RO pin isn't overloaded.

According to the Atmega datasheet ( http://www.atmel.com/Images/doc2503.pdf -- am I looking at the right thing?), the port pins have programmable pull-up resistors, so that if they are used as inputs, they source current when pulled low. This pull-up resistor should be turned off for the pins that are obtaining the receive signal, so that they are in the "Tri-State/High-Z" state (table 20). How high "High-Z" goes isn't specified, but since this is a CMOS chip, that is likely so high that you don't have to worry about bogging down the receiver.

share|improve this answer
add comment

Yes, it will work, there is no difference between using one or multiple mcu's to do work as long as you can partition them properly so there is no contention/overlap between the work.

Since each MCU is only listening it should be quite easy to do(since they can never TX anything there is no contention on the bus).

So, you just have to specify some way for each MCU to do it's own set of work. Each each work load is independent of the other this should be relatively easy. If the workload cannot be split into independent pieces then it is a potentially much more difficult problem and gets into the realm of multi-threading.

Now, as far as the multiple receivers, that depends. Each MCU will act like a stub on the TX line and this can cause signal degradation(impedance matching issues, reflections, etc...). Each RS485 receiver will also act like a stub. Since RS485 is designed to do these things and has relatively low speed you should be fine.

It is difficult to know if this will cause problem or not because it depends on the fine details. How you route, bypass, length of traces, trace impedance, etc...

I would say, go for it, it will probably work fine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.