ResistorMode.PullDown VS hardwired pulldown-resistor?

If you define the resistormode as pulldown in code, then is an hardwired pulldown-resistor obligated?

The micro-controller pins have built in pull up / pull down resistors that can be ‘turned on’ by configuring the correct bits in the correct registers. When you set the resistormode in NETMF it is setting these registers for you. The resistors are already built into the micro-controller.

This does not mean that you would ‘never’ have the need for an external pull up/down resistor though. But most of the time you won’t need an external one.

Thanks.

so I have to choose:

  • place an hardwired resistor with the possibility that the extra resistor stands parallel with a resistor in the PIR unit, and therefore incrementing the current,
  • or not connecting the hardwired resistor and also having the possibility that the current is higher if the output of the PIR unit would be open drain.

I think I’m going to stick with the pulldown-resistor in the code, and remove the hardwired.

The reason the MCU offers these connected to the pins is for simplicity and flexibility. Think of a Fez Panda for instance, you can connect so many different types of device to it that you would never know when you should design a pullup resistor on a pin or not.

The reason people still use their own is that often times the device might require more effective pullup/pulldown than the MCU can offer.

If the internals work for you, then you will most likely be ok to live without them - just remember to keep enabling them in code :slight_smile: