Hello, I am using Uv4 for LPC2148, my LED blinking program works fine in debug mode but does not runs on the board. I am using Flash magic to flash the program. Pls help.
You mean it runs in the Simulator (ie, purely on your PC), but not on your board?
This must mean that:
1. Your code makes an incorrect assumption about the hardware, or
2. Your hardware is faulty, or
3. Both!
As only you have the hardware, and you have not given any details about it or your software, you are the only one who can debug this!
Debugging tips:
www.8052.com/.../120313
www.eetimes.com/.../Developing-a-good-bedside-manner
Yes, it works fine on my PC, but not on the board.
And you have then done what debugging to figure out if you have a hardware issue, or if any of your assumptions in the code are incorrect for the actual hardware?
We haven't seen the hardware.
We haven't' seen the source code.
Exactly how can we then help?
This is the exact code which works fine without any problem. On the hardware LED's are mounted from pin P1.16 to P1.23.
#include "lpc21xx.h" //#include "header_test.h"
int main() { register int i; PINSEL2 = 0x00000000; IODIR1 = 0x00FF0000; IOSET1 = 0x00010000; //IO1CLR = 0x00010000; for(i=0;i<=6;i++) { IOSET1 = IO1SET << 1; IOCLR1 = IO1CLR << 1; }
}
For the hardware details of board please visit www.oasistechsol.com/voyager_board.aspx
This is the exact code which works fine without any problem
I'm missing an infinite loop here.
View all questions in Keil forum