Forums

help

Started by pree...@softeltech.com August 12, 2008
hello,
I am new to lpc group and using lpc board 2387 for the first time.
We have the evaluation board MCB2300, with cpu - lpc2387.
I am not able to test anything with this. The realview, ide which comes along with the cd of evaluation board is not working, we are trying with some simple sample - blinky , using winarm, we are using flash magic to download the hex file to the board using serial port. Please help with the sample and the procedure to download the same and test it.

The blinky code is as below:

#include "LPC23xx.h"
void wait (void) { /* wait function */
int d;

for (d = 0; d < 1000000; d++); /* only to delay for LED flashes */
}

int main (void) {
unsigned int i; /* LED var */

IODIR1 = 0x00FF0000; /* P1.16..23 defined as Outputs */

while (1) { /* Loop forever */
for (i = 1<<16; i < 1<<23; i <<= 1) { /* Blink LED 0,1,2,3,4,5,6 */
IOSET1 = i; /* Turn on LED */
wait (); /* call wait function */
IOCLR1 = i; /* Turn off LED */
}
for (i = 1<<23; i > 1<<16; i >>=1 ) { /* Blink LED 7,6,5,4,3,2,1 */
IOSET1 = i; /* Turn on LED */
wait (); /* call wait function */
IOCLR1 = i; /* Turn off LED */
}
}
}

Thanks in advance

Thanks and regards
Preethi Sreenath


An Engineer's Guide to the LPC2100 Series

My first thought is that "d" will never be larger then 1,000,000 as it
is an int (16bit = 65535) but that assumes that "d" is a 16 bit value in
the processor/complier you are using. I work mostly with 16bit
processors and they mostly (but not all) use char = 8bit, int bit,
long = 32bit.

Jeff

Jeff Milender
Systems Engineer
Cargo Systems
Goodrich Interiors
2604 Highway 20 North
Jamestown, ND 58401
Tel: 701-253-7569
j...@goodrich.com
www.goodrich.com

________________________________

From: l... [mailto:l...] On Behalf
Of p...@softeltech.com
Sent: Tuesday, August 12, 2008 5:59 AM
To: l...
Subject: [lpc2000] help

hello,
I am new to lpc group and using lpc board 2387 for the first time.
We have the evaluation board MCB2300, with cpu - lpc2387.
I am not able to test anything with this. The realview, ide which comes
along with the cd of evaluation board is not working, we are trying with
some simple sample - blinky , using winarm, we are using flash magic to
download the hex file to the board using serial port. Please help with
the sample and the procedure to download the same and test it.

The blinky code is as below:

#include "LPC23xx.h"
void wait (void) { /* wait function */
int d;

for (d = 0; d < 1000000; d++); /* only to delay for LED flashes */
}

int main (void) {
unsigned int i; /* LED var */

IODIR1 = 0x00FF0000; /* P1.16..23 defined as Outputs */

while (1) { /* Loop forever */
for (i = 1<<16; i < 1<<23; i <<= 1) { /* Blink LED 0,1,2,3,4,5,6 */
IOSET1 = i; /* Turn on LED */
wait (); /* call wait function */
IOCLR1 = i; /* Turn off LED */
}
for (i = 1<<23; i > 1<<16; i >>=1 ) { /* Blink LED 7,6,5,4,3,2,1 */
IOSET1 = i; /* Turn on LED */
wait (); /* call wait function */
IOCLR1 = i; /* Turn off LED */
}
}
}

Thanks in advance

Thanks and regards
Preethi Sreenath