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
Hello Andrew,
Below is my code which gives no error.
#include "lpc21xx.h" //#include "header_test.h"
int main() { register int i; PINSEL2 = 0x00000000; IODIR1 = 0x00FF0000; IOSET1 = 0x00010000; //IO1CLR = 0x00010000; while(1) { for(i=0;i<=6;i++) { IO1SET = IO1SET << 1; IO1CLR = IO1CLR << 1; } } }
Hardware details can be found at, www.oasistechsol.com/voyager_board.aspx
Also please tell me why you wrote, only i can debug it! Did i made some mistake?
I'm missing an infinite loop here. I'm missing an infinite loop here. I'm missing an infinite loop here. I'm missing an infinite loop here. I'm missing an infinite loop here. I'm missing an infinite loop here.
Ho sorry, you actually have one - I missed it thanks to your wonderful formatted posted code!
Hello Michael,
Please guide me what wrong have i done?
You are assuming that you can shift the registers left indefinitely. And you are assuming that your code really consumes time. And you are totally ignoring the rules for how to post source code - was it too hard to read the instructions directly above the message input box?
View all questions in Keil forum