Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

lpc2148 code not executing

Status
Not open for further replies.

jayanthyk192

Full Member level 3
Joined
Sep 17, 2010
Messages
179
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
2,580
Hi,

I starting to work with LPC2148 MCU. I bought a daughter board with the IC in it. It has the crystal connected, Vss and Vdd supplied with proper voltages. I added a 12k to reset and pulled it up. I used a 12k at PO.14 and pulled it up. I'm able to burn the flash, but the code is not running. Another problem is that, when i pull the PO.14 to gnd, even without resetting, the bootloader is enabled. then after burning flash the reset works but code doesnt. I have left all JTAG pins as it is, not pulled up or down. I even added a capacitor at reset but no change. Please help me solve the problem. I had a similar problem with LPC2106 because of clock problem. But i tried changing it and it still doesn't work

Thank you
 

Post the code.

this is the code:

Code:
#include<lpc21XX.h>

int main()
{

 IODIR0 = 0XFFFFFFFF;
 IODIR1 = 0XFFFFFFFF;

	
while(1)
{	
 IOSET1 = 0XFFFFFFFF;
 IOSET0 = 0XFFFFFFFF;
 IOCLR1 = 0XFFFFFFFF;
 IOCLR0 = 0XFFFFFFFF;
}	
}
 

Try this.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<lpc21XX.h>
 
int main()
{
 
 IODIR0 = 0X4000; //P0.14 as output
 IODIR1 = 0X0001; //P1.0 as output
 
    
while(1)
{   
 IOSET1 = 0X0001;
 IOSET0 = 0X4000;
 
 //add delay of min 500 ms here
 
 IOCLR1 = 0X0001;
 IOCLR0 = 0X4000;
}   
}

 

Try this.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include<lpc21XX.h>
 
int main()
{
 
 IODIR0 = 0X4000; //P0.14 as output
 IODIR1 = 0X0001; //P1.0 as output
 
    
while(1)
{   
 IOSET1 = 0X0001;
 IOSET0 = 0X4000;
 
 //add delay of min 500 ms here
 
 IOCLR1 = 0X0001;
 IOCLR0 = 0X4000;
}   
}


I burnt the microcontroller :sad:. I was trying to reconnect wires and i let one of the pins touch a 5V rail. I ended up burning the microcontroller. I'll get back if there are any problems in the new one i"m buying today.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top