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.

ARM NXP LPC2148 simple problem keil

Status
Not open for further replies.

ronydc

Full Member level 3
Joined
Nov 17, 2005
Messages
166
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Activity points
2,612
dear friends,
i m very new to ARM.
and using KEIL UV4 for LPC2148 Programming

Can some one just give me an example program to just make anLED on to a pin of the ic LPC 2148 ..?

i did the followong but not working.

#INCLUDE <LPC2148.H>

sbit led = P0^15;

wait()
{
unsigned int x;
for (x=0;x<=33000;x++)
}


main()
{
for(;;)
{
led = 0; // led blinking
wait();
led = 1;
}
}

the above is the program i wrote to burn in to LPC2148.
BUT BEFORE I BURN IT GIVES THE COMPILATION ERRORS IN keil --- "missing Identifier"-- at "sbit".

I THINK WE CANT USE "SBIT" HERE.

WHAT COULD BE THE CORRECT PROGRAM.. CAN SOME ONE SHOW ME THE WAY .?
some one can point me even to some simple example programes link too.

- aWAITING rONY.
 

First of all you need to read the GPIOs chapter for lpc 2148 from datasheet and user manual. This is for i/o ports used for arm controller. You need to access whole register at once. I mean 32 bit instructions. User manual will tell you everything.
I'll send you codes very soon.
 

8051 instructions are different frm ARM..
there are no bit instructions in ARM......
whole GPIO pin is to used here...by masking....make that bit to high or low...

better read the instruction set and workit out....[/quote]
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top