myelin / modular-arm-usb

LPC11U14 USB test board by Phil Pearson and Philip Lindsay
0 stars 0 forks source link

Add pushbutton #16

Closed follower closed 9 years ago

follower commented 9 years ago

See:

follower commented 9 years ago

What's the situation with internal pull-ups/-downs on this chip?

follower commented 9 years ago

From UM10462-LPC11Uxx.pdf:

7.3.2 Pin mode The MODE bits in the IOCON register allow the selection of on-chip pull-up or pull-down resistors for each pin or select the repeater mode. The possible on-chip resistor configurations are pull-up enabled, pull-down enabled, or no pull-up/pull-down. The default value is pull-up enabled. The repeater mode enables the pull-up resistor if the pin is at a logic HIGH and enables the pull-down resistor if the pin is at a logic LOW. This causes the pin to retain its last known state if it is configured as an input and is not driven externally.

With the additional note (useful if we use a pull-up resistor):

7.3.4 Input inverter If the input inverter is enabled, a HIGH pin level is inverted to 0 and a LOW pin level is inverted to 1.

As such, I suggest we connect the push button to ground, then enable the pull-up and (optionally) input inverter in software.

In terms of which input pin to use (they're mostly interchangeable apart from the obvious special purpose ones) I suggest just picking whatever is easiest to route.

follower commented 9 years ago

Added symbol & footprint via: dd8db1db5ba5befc9ece03c8c793b4d07687103a, 92678bc670e17105302f3be0f1d76d7f90e72a87 & b973642893017d6175ceb129be622d89153dc02a

follower commented 9 years ago

pp: "throw it on some arbitrary pin and i'll move it around if necessary"

follower commented 9 years ago

BTW pushbutton ended up on PIO1_25.

follower commented 9 years ago

Closing 'cos it's added and working.