ghegde
Member level 1
Dear friends,
I am new to ARM microcontrollers. I wrote a code to blink the LED connected to pin P1.24(of LPC2148).The hex file is downloaded and verified successfully using Flash Magic.But the LED is not blinking!!!!!!!!!.I used Keil IDE.What may be the problem?
The C code is as follow........
/*******************************************************************************
Header files
*******************************************************************************/
#include "LPC214x.h"
/*******************************************************************************
MAIN
*******************************************************************************/
int main (void) {
// for loop variable declaration
int j,i;
// P1.24 output
IODIR1 = 0x01000000;
// endless loop to toggle the led
while (1) {
for (j = 0; j < 30; j++ )
{
for (i = 0; i < 50000; i++ ); //Delay Loop
}
//Turn ON LED
IOSET1 = 0x01000000;
for (j = 0; j < 30; j++ )
{
for (i = 0; i < 50000; i++ ); //Delay Loop
}
//Turn OFF LED
IOCLR1 = 0x01000000;
}
}
I am new to ARM microcontrollers. I wrote a code to blink the LED connected to pin P1.24(of LPC2148).The hex file is downloaded and verified successfully using Flash Magic.But the LED is not blinking!!!!!!!!!.I used Keil IDE.What may be the problem?
The C code is as follow........
/*******************************************************************************
Header files
*******************************************************************************/
#include "LPC214x.h"
/*******************************************************************************
MAIN
*******************************************************************************/
int main (void) {
// for loop variable declaration
int j,i;
// P1.24 output
IODIR1 = 0x01000000;
// endless loop to toggle the led
while (1) {
for (j = 0; j < 30; j++ )
{
for (i = 0; i < 50000; i++ ); //Delay Loop
}
//Turn ON LED
IOSET1 = 0x01000000;
for (j = 0; j < 30; j++ )
{
for (i = 0; i < 50000; i++ ); //Delay Loop
}
//Turn OFF LED
IOCLR1 = 0x01000000;
}
}