Dispose InputPort Problem

When I try and Dispose and InputPort on my FezPandaII, it seems like the pins is changing to an output port and driving high. I would have assumed it would default to an input and therefore not actually change the hardware state.

I make D11 an InputPort with Pullups disabled. I placed a 100K resistor to ground on the pin. I put a breakpoint on the call to the Dispose method of that port. When I run the program and it breaks before Dispose the voltage on the pin is 0v. Press F10 to execute the Dispose method the voltage immediately jumps to 3.3V

Anyone know why this would happen?

That is pull up internally. Just add a pull down resistor if you want low or use input port with pull down enabled.

Hi Gus, doesn’t the explanation above imply there’s a pull down? I am guessing that the 100k value is not sufficient to pull it down against the internal pullup, so if you change the value you will get what you require.

@ Brett - he said

the pin default state is input with pull up enabled. And this is what you get after disposing a pin. Am I missing something? He thinks it is putput high but it is a weak pull up resistor. Adding 10K pull down will make it low, maybe 1K. The internal resistor is about 100k I think so 100K external pull down is not enough.

Thanks, that was the problem. Is this documented somewhere (which pins by default have pullups)

[quote]I make D11 an InputPort with Pullups disabled. I placed a 100K resistor to ground on the pin.[/quote] this was the bit I mentioned - should have quoted it originally :slight_smile: