hi
i'm testing my first project using all in 1 development board eedt6.00 Keiluvision4 and flashmagic. i use the sample source code:
#include <lpc21xx.h> void wait (void) { /* wait function */ long d; for (d = 0; d < 10000; 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 */ } } }
debugging running with succes i see in the pheripals block 1 the io ports being swithched on and off then i'm creating the hex file i get 0 errors and 0 warnings in flashmagic i select the correct hex file and start the programming with verrification. no problems, green and red led blinking. after that flashmagic says finished. When connecting the 8 pins to the led's i get nothing. after messuring the io ports are 2.2 vdc stationairy. other io port for example port 1.31 reads 3.3 volt ???.
so program run correct in debugging mode, flashing seems all right, on the board led D1 is blinking D12 D16 D17 are lit.
thanks in advance Thomas Crow
since you make the mistake of using a "hope it does it, though I wrote it in C" delay I guess that "messuring the io ports are 2.2 vdc stationairy" represent a "DC reading of AC". What does a scope show?
I do believe that you are blinking waaaaaaay too fast (which makes it invisible), use a timer and set it for, say 200ms blink freq.
Erik
i tested this:
Do one set of code that only do IOSET1 and test running it. Do one set of code that only do IOCLR1 and test running it.
both tests where resulting in a vdc 2.1 at the io ports
i think it's a hardware faillure
thanks for the tips.
Are you using the correct pins - if they are tristated, then you can use a 10k resistor connected to +3V3 or GND and force the signal to significantly change voltage (in one direction, the LED will put up a bit of a fight, stopping you from reaching the rail).