This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC 2138 compiler settings problem

I've bought a sparkfun logomatic v1.0 to change reprogram as an advanced datalogger. There is a lpc2138 onboard and it is possible to program it with the lpc2000 flash utility.

I've tried to compile a test progam, just to blink some leds on P0.x but the processor seems to do only the first command. I believe there is somewhere a parameter in the compiler settings I've mist.

I set up for a lpc2138 changed the freq to 147.456 MHz, IROM from 0x4 to 0x7FFF, IRAM from 0x40004000 to 0x40007FFF just like detailed in the datasheet.

#include <LPC213x.H>


void delayms(int j) {
        unsigned int i;
        unsigned int k;
        i = 0;
        k = 0;

        while (i != j) {
                k = 0;
                while (k != 14746) { k++; }
                i++;
        }
}

int main (void)  {
        PINSEL0 = 0x00000000;
        IODIR0 =  0xFFFFFFFF;
        IOCLR0 = 0xFFFFFFFF;

        while (1)  {
                IOSET0 = 0xFFFFFFFF;
                delayms(1000000000);
                IOCLR0 = 0xFFFFFFFF;
                delayms(1000000000);
        }
};

Is there anything I'm missing?
Thanks in advance,
Ruben

0