Page 1 of 1

[nRF52] Button/LED support though IOExpander on PCA10040 and PCA10056 boards

Posted: Wed Apr 17, 2019 3:57 am
by FoldedToad
For those using the Nordic nRF52 eval boards for MicroPython development, you might be interested in freeing the GPIO pins consumed by the Buttons/LEDs. This can be accomplished by shorting the pin 5 (SHIELD_DETECT) of the ICSP header to ground.
This shorting will free the Button/LED GPIOs, but result in the lost of direct access to the Buttons/LEDs.

Access to the Buttons/LEDs can be accomplished though the on-board IOExpander (PCAL6408A, U7).
The link below provides a simple template module which shows how to program the IOExpander to preform IO operations as well as pass in interrupts. ... ioexpander

The file has more details