8 years, 10 months ago.

Pin mode

When using DigitIn, which of these statements is correct

1. The input is defaults to pullup mode 2. if you want the pin to be pulled down, you have to do this explicitly through the mode function 3. When using DigitalIn, the pin mode are not in any predetermined state - if you do not set them explicitly you can have problems 4. When you attach an interrupt to a pin, the rise or fall automatically sets up the pin mode.

Reason for Question: Still trying to get my LPC1114 app going.

1 Answer

8 years, 10 months ago.

1) Yes. The NXP parts like the LPC1114 generally default to pins being pulled up.

2) Yes.

3) No. Even if the mbed library doesn't set a default pullup/down mode hardware will certainly have a default reset setting that can be found buried somewhere in the user manual for the CPU.

4) No. If you are counting on the internal pull then you should set it explicitly.

Accepted Answer