milan.rajik
Banned
- Joined
- Apr 1, 2013
- Messages
- 2,524
- Helped
- 540
- Reputation
- 1,078
- Reaction score
- 524
- Trophy points
- 1,393
- Activity points
- 0
Why code doesn't work as expected ?
This is my IAR EW ARM code for LPC2148. The LEDs 0n 0.4, 0.5, 0.6 and 0.7 turn ON but they don't turn OFF. I am new to ARM programming. I have written LED blink code in Keil uVision 5 for LPC2148 and it works fine but IAR code is not working.
Should I use IO0CLR = 0x00000000; ?
This is my IAR EW ARM code for LPC2148. The LEDs 0n 0.4, 0.5, 0.6 and 0.7 turn ON but they don't turn OFF. I am new to ARM programming. I have written LED blink code in Keil uVision 5 for LPC2148 and it works fine but IAR code is not working.
Should I use IO0CLR = 0x00000000; ?
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <intrinsics.h> #include "iolpc2148.h" void Delay() { unsigned long int i; for(i = 0; i < 4000; i++); } int main() { IO0DIR = 0x000000F0; while(1) { IO0SET = 0x000000F0; Delay(); IO0SET = 0x00000000; Delay(); } }