EmbeddedRelated.com
Forums

Re: My first program using Keil and LPC2148

Started by Michael Melkonian September 25, 2007
Try using bitwise 'and' in your loop to start with (& instead of &&); perhaps a quick re-read of Kernigan & Ritchie is in order :)

roboticsbcn wrote:
Hello,

this is my first post in this group :)
I have some experience using PIC MCU, but now I am making my first
program for the LPC2148. Exist some tutorial to start with KEIL and
ARM7?

Because east program does not work ?

IODIR0|=0x00000004; // PIN0.2 IN
IOPIN0|=0x00000004; // LED OFF

IODIR0&=0xFFFFFFEF; // SWITCH

while(1)
// Loop Continue
{
if ((IOPIN0 && 0x00000010)==0x00000010) FIO0CLR=0x00000010;
else FIO0SET=0x00000010;
}

THANKS !!!

An Engineer's Guide to the LPC2100 Series

Thanks Michael! It is evident that I need to refresh the C in my
head :)
Somebody recommends to me a tutorial to see some easy examples with
the LPC2148?

--- In l..., Michael Melkonian
wrote:
>
> Try using bitwise 'and' in your loop to start with (& instead of
&&); perhaps a quick re-read of Kernigan & Ritchie is in order :)
>
>
> roboticsbcn wrote:
> Hello,
>
> this is my first post in this group :)
> I have some experience using PIC MCU, but now I am making my first
> program for the LPC2148. Exist some tutorial to start with KEIL and
> ARM7?
>
> Because east program does not work ?
>
> IODIR0|=0x00000004; // PIN0.2 IN
> IOPIN0|=0x00000004; // LED OFF
>
> IODIR0&=0xFFFFFFEF; // SWITCH
>
> while(1)
> // Loop Continue
> {
> if ((IOPIN0 && 0x00000010)==0x00000010) FIO0CLR=0x00000010;
> else FIO0SET=0x00000010;
> }
>
> THANKS !!!
>
>
>
>
Try www.hitex.co.uk - great tutorials!

--- In l..., "roboticsbcn"
wrote:
>
> Thanks Michael! It is evident that I need to refresh the C in my
> head :)
> Somebody recommends to me a tutorial to see some easy examples
with
> the LPC2148?
>
> --- In l..., Michael Melkonian
> wrote:
> >
> > Try using bitwise 'and' in your loop to start with (& instead of
> &&); perhaps a quick re-read of Kernigan & Ritchie is in order :)
> >
> >
> > roboticsbcn wrote:
> > Hello,
> >
> > this is my first post in this group :)
> > I have some experience using PIC MCU, but now I am making my
first
> > program for the LPC2148. Exist some tutorial to start with KEIL
and
> > ARM7?
> >
> > Because east program does not work ?
> >
> > IODIR0|=0x00000004; // PIN0.2 IN
> > IOPIN0|=0x00000004; // LED OFF
> >
> > IODIR0&=0xFFFFFFEF; // SWITCH
> >
> > while(1)
> > // Loop Continue
> > {
> > if ((IOPIN0 && 0x00000010)==0x00000010) FIO0CLR=0x00000010;
> > else FIO0SET=0x00000010;
> > }
> >
> > THANKS !!!
> >
> >
> >
> >
> >
> >
> >
>