In a now-deleted comment, it seemed like you are using the KEIL break-out board MCB2300.
I found these MCB 2300 schematics on the KEIL site. These indicate that P1.24 - P1.31 are wired to the LCD module. This LCD module uses the same interface as the HD44780 in "nibble mode."
I found some sample code on a blog named "Embedded Microcontroller Programming" where a developer named Doug has nicely explained how he interfaced an LPC2300 chip to another LCD module with the same interface (nibble HD44780). Remember as you port this code that this article assigns the ARM GPIO pins P2.0-P2.5 to the functions the KEIL MCB 2300 assigns as P1.24 - P1.31.
Another article at HobbyRobotics.com covers the protocol again but does not implement the ability to read LCD registers (the R/W* pin is wired to ground). The coverage of the protocol there has nice logic signal timing diagrams.
KEIL Embedded Hobby HD44780
MCB uController Robotics Function
2300 Prog.
----- -------- ------- ------
P1.31 P1.22 P2.4 E (Enable/Chip-Select)
P1.29 P1.25 Gnd=W R/W* (Bus Read/Not-Write)
P1.28 P1.23 P2.5 RS (Registers Select)
P1.24 P1.27 P2.0 D0 (aka DB4)
P1.25 P1.20 P2.1 D1 (aka DB5)
P1.26 P1.26 P2.2 D2 (aka DB6)
P1.27 P1.21 P2.3 D3 (aka DB7)
Notice how each context has different pin assignments which are representations of the actual wires which connect the MCU to the LCD.