i just need some clarification!!

sorry for my bad english,

i just want to make sure,
A. if "digitalWrite(1, HIGH)" is making pin 1 is VCC right?,
B. if "digitalWrite(2, LOW)" is making pin 2 is GND right?,

C. if both above answers are right, what happened to arduino or the pins if pin 1 and pin 2 connected?

thanks for reading

A) Correct
B) Correct
C) It will cause a short that will destroy the internal circuitry of one or both of the pins.

Hi,
Do you have a reason to connect two output pins together?

Tom... :slight_smile:

BJHenry:
A) Correct
B) Correct
C) It will cause a short that will destroy the internal circuitry of one or both of the pins.

thanks, that answer that i want to know, thanks again

TomGeorge:
Hi,
Do you have a reason to connect two output pins together?

Tom... :slight_smile:

i just want to know the risk, some said it has internal protector or resistor or something, but i like to clarification of it
(sorry about late reply, i must wait 5 newbie post limitation)

Kucingmiow:
i just want to know the risk, some said it has internal protector or resistor or something, but i like to clarification of it
(sorry about late reply, i must wait 5 newbie post limitation)

No problem, good question.
Tom... :slight_smile:

Kucingmiow:
i just want to know the risk, some said it has internal protector or resistor or something, but i like to clarification of it
(sorry about late reply, i must wait 5 newbie post limitation)

The pins behave differently if they are set as pinMode(pin, INPUT); or as pinMode(pin, OUTPUT);.

The short circuit risk arises if BOTH pins are set as OUTPUT. When a pin is set as INPUT it has a very high internal resistance and connecting an INPUT pin to HIGH or LOW causes no problems.

Note, also that you cannot set an INPUT pin to HIGH or LOW. If you use digitalWrite(pin, HIGH); to an INPUT pin it turns on the internal pullup resistor. It would be equivalent of pinMode(pin, INPUT_PULLUP);

...R