Hi,
I suggest to use the CapTouch_5ch demo from Code Bundle (supports Keil, IAR, and MCUXpresso) as reference.
You can download it from the following link:
LPCXpresso804 board for LPC804 Microcontroller (MCU)|NXP
Have a great day,
Soledad
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------