#include int main(){ unsigned long x, i, j; // from P1.24 -> 31 LPC_PINCON->PINSEL0 = 0; // values LPC_GPIO0->FIODIR = 0xFF<<15; x = 1<<15; // new variable while(1){ x = 1<<15; // LOOP to fill 24->31 incrementally for(i=0;i<8;i++){ LPC_GPIO0->FIOSET=x; x = x<<1; for(j=0; j<800000; j++); } // delay // LOOP to empty 24->31 incrementally. x = 1<<15; for(i=0;i<8;i++){ LPC_GPIO0->FIOCLR=x; x = x<<1; for(j=0; j<800000; j++); } }