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.

Give me IAR EW ARM example for LPC2148 LED blink

Status
Not open for further replies.
find attachement
 

Attachments

  • Lpc214x.zip
    361.3 KB · Views: 120


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int i=8;
main()
{
  IO0DIR |= 0x0000FF00;   P0.8 to P0.15 as output
   IO0SET |= 0x0000FF00;  P0.8 to P0.15
while(1)
{
   IO0CLR |=(1<<i); 
   Sleep(200);
IO0SET |=(1<<i);
Sleep(200);
}
 
 
}

 
@EasyRider

What do you mean by bitbang write only registers ? We are only writing to PORT and not reading them.

I am new to IAR Compiler and LPC MCUs but if somebody help me with an LED example then I will try to master LPC MCU programming in another 3 months.

I tried this but it didn't work. That's why I am asking. http://embeddedcraft.org/iar_arm2.html
 

When I sad write only I mean that you can only write to this register.
IO0SET |= value equal IO0SET = IO0SET | value - read, modify, write
The correct way is to write directly:
IO0SET = value

- - - Updated - - -

I am new to IAR Compiler and LPC MCUs but if somebody help me
Man, you creating few topics per day with the same questions. Last time you crashed one PIC16F877 as I remember. Possible, beter way is to create one common topic like a "teaching Milan how to work with micronontrollers"
Iar, MikroC, PIC, LPC - doesn't matter.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top