On the LPC178x/7x, I/O pads are powered by VDD(3V3), this is the power supply voltage for I/O other than pins in the VBAT domain; while VDD(REG)(3V3) powers the on-chip voltage regulator which in turn provides power to the CPU and most of the peripherals.
The digital inputs are 5 V tolerant (5 V tolerant if VDD(3V3) present; if VDD(3V3) not present, do not exceed 3.6 V) providing digital I/O functions with TTL levels and hysteresis.
For digital inputs you can handler 5v without issues, however for digital outputs the maximun output voltage is VDD(3V3).
Please consider that 3.3v is already a HIGH for TTL input pins, please check the below link you can find a conexion that you can use as reference:
Interfacing HC-SR04 Ultrasonic Distance Sensor with LPC2148
Have a great day,
Sol
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------