Why the pin 2 could get HIGH value?

I am a fresh man about the arduino, today i read the Input Pull-Up Resister chapter document at here: Digital Input Pull-Up Resistor | Arduino Documentation | Arduino Documentation

I am confused about the Circuit at that page, because i noticed that pin 2 hasn't connect to the pin 5V of the Ardunio Uno board so how can the pin 2 read HIGH ? Mmm,just because the type of pin 2 is Input Pull-Up? Thx

Yes. Below taken from the 328P datasheet.

When you enable the internal pull-up resistor, the FET in the right top connects the resistor Rpu to Vcc (5V / 3.3V depending on Vcc).

Hello
Take a view here to gain the knowledge.

Many thanks to LarryD

Have a nice day and enjoy coding in C++.
Дайте миру шанс!

1 Like

Well it's not so much that pin 2 is an specific type, all the pins can be made to turn on their pull up resistor by a software command, normally done in the setup function in your code.
Note that example uses

pinMode(2, INPUT_PULLUP);

For a full discussion about inputs see
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

By the way I moved your post away from where you posted, which is meant to be about installing the IDE software.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.