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.

ARM7(LPC2148TDMI) port pin progrmming bug

Status
Not open for further replies.

bikas.bikun

Junior Member level 3
Joined
Nov 22, 2010
Messages
25
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
pune
Activity points
1,443
i have done the following program to toggle port0 in Keil4 evaluation version but i observe pins P0.28,P0.29,P0.30 are not blinking. could any body tell me why so ?

here is my program :

#include <LPC214x.H>

void delay(unsigned int a)
{
int i;
for (i=0;i<a;i++)
{;;}
}
int main(void)
{
PINSEL0=0x00000000;
IODIR0 = 0x8fffffff;
while(1)
{
IOSET0 = 0x8fffffff;
delay(1000);
IOCLR0 = 0x8fffffff;
delay(1000);
}
}
 

Does it run on Keil's simulator?

---------- Post added at 16:17 ---------- Previous post was at 16:16 ----------

if you use 12Mhz crystal then the delay is absolutely negligible

make delay as 50000 or something like that.. and declare it properly with proper datatype...
 

Yes your code is fine it is just executing too fast for you to see it, use a delay of 1000000 (about 130ms delay @60MHz) to be able to see the toggle.

Alex
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top