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.
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]