Hat ein Arduino Mega 2560 interne Pull-up Widerstände oder braucht es noch externe 10kOhm Widerstände?
Hallo zusammen
Ich möchte gerne Schalter und einen Encoder an den Arduino Mega 2560 anschliessen. Der Encoder geht über eine ISR auf Pin 2 & 3. Haben diese Pins schon einen Pull-up widerstand oder muss ich einen externen 10kOhm Widerstand hinzu fügen? Im Internet steht, dass dies ein Atmega schon hat. Hat der Arduino Mega 2560 einen Atmega?
3 Antworten
Hey,
das sagt Arduino zu den Pull-up-Widerständen:
The value of this pullup depends on the microcontroller used. On most AVR-based boards, the value is guaranteed to be between 20kΩ and 50kΩ. On the Arduino Due, it is between 50kΩ and 150kΩ. For the exact value, consult the datasheet of the microcontroller on your board.
https://www.arduino.cc/en/Tutorial/DigitalPins
Also ja: Im Mega ist ein ATMega2560 verbaut, und das ist ein AVR 8 Bit Mikrocontroller. Du kannst also den Input-pull-up verwenden anstelle eines externen Widerstands.
Cheers.
Schon in das Datenblatt oder in die Arduino Beschreibung geschaut?
Ja, im Internet, aber wusste nicht ob pull up und pull down funktioniert und ob das auch bei dieser Anwendung geht
Ja, kannst du mit "pinMode(PIN, INPUT_PULLUP);" anschalten.