Leo Houer
Leo Houer

Reputation: 347

How to pull low a digital input pin (with Arduino board)?

I have a serial over RF module (3.6-5V operating voltage) that can be set into programming mode by pulling low one of the input pins.

This is the description from the datasheet for PIN 5:

PIN 5: Pull up to high or NC for normal operation mode. Pull low to enter AT Command mode.

I am pretty sure that i just need to connect PIN 5 to ground with a 1K pull down resistor, right?

But could i achieve the same by connecting it to an Arduino i/o pin and doing this:

pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);

Upvotes: 0

Views: 3452

Answers (1)

dfowler7437
dfowler7437

Reputation: 461

Based on your description, you can connect the pin to ground. Using the 1K resistor is risky without knowing more. Since you can leave the pin open, it must have an internal pull up resistor, if so, pulling it down with a 1K could create a voltage divider, resulting in an invalid input voltage.

The code you show should set that pin low just fine. If you intend to always use AT command mode, I would tie the signal directly low.

I would like clarification if it wrong to post/answer electronics related question here. For Ardunio related post, I would expect most questions to overlap software/hardware boundaries.

Upvotes: 2

Related Questions