What compiler are you using? I've used the LPC11xx a good amount. C code is interchangeable with LPC13xx devices as well. If you want some sample code for something, let me know. I use Crossworks, which is just a GCC front end. SystemInit() is from CMSIS, which is available from NXP.
Here's a simple blinky program. The delays are not accurate
#include "LPC11xx.h" /* LPC11xx definitions */
void delay_us( int);
void delay_ms( int);
void main( void)
{
volatile unsigned int x, y;
SystemInit();
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 6); //Enable AHB clock for GPIO
LPC_GPIO1->DIR |= (0x01 << 7); // PORT 1 pin 7 set to output
while( 1)
{
delay_ms( 100);
LPC_GPIO1->DATA |= (0x01 << 7);
delay_ms( 100);
LPC_GPIO1->DATA &= ~((0x01 << 7));
}
}
void delay_us(int delay)
{
while(delay--)
{
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
__asm volatile (" NOP");
}
}
void delay_ms(int delay)
{
char i;
while(delay--)
{
for(i=0; i<4; i++)
{
delay_us(250);
}
}
}