Hi realgks
Please check CapTouch_5ch demo (LPCXpresso 804 board Rev2/RevB and CapTouch Shield board Rev2/RevB (OM40001)) 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
You can also use other demo code of CodeBundle package as well.
Best Regards
Jun Zhang