Problem in LED Blinking program for gcc and olimex board LPC2378

dear all, Please help me, I am using gcc compiler with eclipse. My board is of olimex LPC2378, I am writing a program to blink the LED.

I am blinking the leds which are connected at P0.26 to P0.24. So for that I am configuring the registers as following...

IODIR = 0x07000000;

IOCLR = 0x0700 0000; to glow LEDs IOSET = 0x0700 0000; to making LEDs OFF

But there is no any effect on LEDs.

but if I change the code in following way ...

IODIR = 0x00000700;

IOCLR = 0x00000700;; to glow LEDs IOSET = 0x00000700; to making LEDs OFF

After that it is working...

so I am not getting the reason ? I am using header file in which declared these registers as following... #define IOPIN (*((volatile unsigned long *) 0xE0028000)) #define IOSET (*((volatile unsigned long *) 0xE0028004)) #define IODIR (*((volatile unsigned long *) 0xE0028008)) #define IOCLR (*((volatile unsigned long *) 0xE002800C)) My code is below... #include delay() { int i,j; for(i = 1;i

Reply to
sach
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.