Content originally posted in LPCWare by lerlacher on Sat May 24 12:03:38 MST 2014
Of course right after posting I found the problem, my code enables the pullup resistor and not the pulldown. It has to be like this:
<code>
LPC_IOCON->R_PIO1_0 &= ~0x1F;
LPC_IOCON->R_PIO1_0 |= (0x1 << 3) | 0x3;
</code>