Hi, I have tested my ARM7 stamp baord with some of the supplied test HEX files including UART test with Tera Term. All good.
My problem however is when I generate the hex files myself with Keil uv3. Do you have any idea what I possibly could have wrong ?
I am using the supplied source files, startup file, headers etc. When I compile I have 0 errors, 0 warnings and the hex file is produced.
I appreciate any help.
thanks
Have I checked the compiler switches? I need to check them. Will the delay function work? Will it always work? What can effect it? Is anybody listening?
Obviously I cannot check if the delay is working because nothing is working on the stamp board.
Can I post the screenshots somewhere?
I can make a smaller simple program first?
I tried with this..
#include <LPC21xx.H> // LPC2119 MPU Register /* pototype section */ int main(void) { PINSEL2 &= 0xFFFFFFFC; // Makesure GPIO1.16 = GPIO Function IODIR1 = 0x00010000; // Set GPIO1.16 = Output IOSET1 = 0x00010000; // Set GPIO1.16 Output Pin (OFF LED) IOCLR1 = 0x00010000; // Clear Output Pin P1.16 (ON LED) }
But the same thing. Port 1 remained high. Can you compile it and post the HEX contents so I can compare?
thanks a lot
did I forget to put a loop at the end of main to stop it ending?
can you compile it yourself?
int main(void) { // la de da coding stuff the_next_step: goto the_next_step; }
It's good to know that C/C++ has no suitable looping construct for creating infinite loops, so a goto construct is needed.
goto is an old technique for branching, long since lost in the sands of time.
I corrected the while(1); issue because I had modified the original code and I forgot the infinite loop at the end. I still have nothing working.
Now I am just putting the Port Low but it is remaining @ 2.1V. How come. This is the code:
#include <LPC21xx.H> // LPC2119 MPU Register int main(void) { PINSEL2 &= 0xFFFFFFFC; // Makesure GPIO1.16 = GPIO Function IODIR1 = 0x00010000; // Set GPIO1.16 = Output IOSET1 = 0x00010000; // Set GPIO1.16 Output Pin (OFF LED) // Loop Blink LED on GPIO1.16 // IOCLR1 = 0x00010000; // Clear Output Pin P1.16 (ON LED) while(1); } This is a screen shot of the options. Is there anything wrong for LPC2119?
This is a screen shot of the options. Is there anything wrong for LPC2119?
[IMG]i58.tinypic.com/20ruuet.png[/IMG]
you need a delay function to see the blinking
IOSET1 = 0x00010000; // Set GPIO1.16 Output Pin (OFF LED) // Loop Blink LED on GPIO1.16 // delay_function(); IOCLR1 = 0x00010000;
But i think that it will not working yet. Can you send another screen shot from linker tab?