Parallel output pins

Hi,

I am wondering if it is safe to drive the base resistor of a single transistor connected to two seperate output pins of two different Attiny85 microcontrollers.Each output pin will be controlled via a switch input (one switch for each output).Hope this makes sense.

Thank You

OK as long as the grounds are all connected together and you do not exceed the 20 mA recommended pin output current limit.

Make an "or" with two diodes (and one base current limiting resistor).
Anodes to the output pins, cathodes joined to a single base resistor.
Leo..

Make an "or" with two diodes

Good catch! For some reason I was thinking that there would be two base resistors.

It is NOT safe to connect two outputs directly together!

Thank You all guys for your response, was thinking that maybe the two base resistor method was OK, but the two diodes solution seems to be the answer, appreciate your advise.

Paralleling output pins is only sensible if you use direct port manipulation and the pins
are on the same 8-bit port, and if the sketch always switches them in unison - so it
can be done, but with care. All 8 bits of a port are updated on the same clock edge
when a port is written (ie PORTD |= 0xF0; sets D4 to D7 on the Uno for instance)

MarkT:
Paralleling output pins is only sensible if you use direct port manipulation and the pins
are on the same 8-bit port, and if the sketch always switches them in unison - so it
can be done, but with care. All 8 bits of a port are updated on the same clock edge
when a port is written (ie PORTD |= 0xF0; sets D4 to D7 on the Uno for instance)

I must see the first direct port manipulation that works on two independent micros at the same time :smiley:

I'm not yet familiar with direct port manipulation, alot to learn but am enjoying the challenges that my project are throwing up.My concerns were sending 5v to an output pin but the diode solution was or seems to be the answer as i have breadboarded this option and it works.

Thank you

sure, the diode option is OK, but, I'm still wondering why you'd use 2 outputs when actually need only 1 :roll_eyes:

OK, thanks, I didn't notice the "2 different Attiny85" in the first post :confused:

Hi again,

Just wondering if i wanted to remove one of the switches, would the attached circuit also be safe or am i missing something.

Quite safe, but why would you want to do that?


Note: one switch, only one pull-up resistor needed - or use INPUT_PULLUP instead of a resistor.

Thank you Paul,

Sorry i posted the wrong schematic, the correct one attached will be switching two different loads from a single switch and i'm just curious to know if it is safe.

Some notes on your circuit:

  • The collectors and emitters are not connected
  • The diodes are not needed where they are shown
  • The pushbutton inputs are shorted together. Not a problem unless both get configured as outputs.
  • The pushbutton has 2 pullup resistors, only one needed.

Same comments!