Forums

Fast GPIO on LPC2294

Started by jdauchot March 25, 2009
Hi

I am trying to use FGIO on LPC2294 and I cannot get the ports to toggle.

I have set SCS = 3 to enable Port 0 and Port 1 to go fast

Then I use FIO1DIR ,FIO1SET , FIO1CLR etc

Can anyone give me a clue what I am doing wrong

Regards

Jean-Jacques

An Engineer's Guide to the LPC2100 Series

I have done the following and it works:

#define TRIG_BIT 0x04 //P2.10
#define SET_TRIG_OUTPUT FIO2DIR1 |= TRIG_BIT
#define SET_TRIG FIO2SET1 = TRIG_BIT
#define CLR_TRIG FIO2CLR1 = TRIG_BIT

SET_TRIG; //P2.10 goes high
CLR_TRIG; //P2.10 goes low

--- In l..., "jdauchot" wrote:
>
> Hi
>
> I am trying to use FGIO on LPC2294 and I cannot get the ports to toggle.
>
> I have set SCS = 3 to enable Port 0 and Port 1 to go fast
>
> Then I use FIO1DIR ,FIO1SET , FIO1CLR etc
>
> Can anyone give me a clue what I am doing wrong
>
> Regards
>
> Jean-Jacques
>

Yes but that port2

I am using port0 and port1

regards

Jean-Jacques

--- In l..., "mats.sernfalt" wrote:
>
> I have done the following and it works:
>
> #define TRIG_BIT 0x04 //P2.10
> #define SET_TRIG_OUTPUT FIO2DIR1 |= TRIG_BIT
> #define SET_TRIG FIO2SET1 = TRIG_BIT
> #define CLR_TRIG FIO2CLR1 = TRIG_BIT
>
> SET_TRIG; //P2.10 goes high
> CLR_TRIG; //P2.10 goes low
>
> --- In l..., "jdauchot" wrote:
> >
> > Hi
> >
> > I am trying to use FGIO on LPC2294 and I cannot get the ports to toggle.
> >
> > I have set SCS = 3 to enable Port 0 and Port 1 to go fast
> >
> > Then I use FIO1DIR ,FIO1SET , FIO1CLR etc
> >
> > Can anyone give me a clue what I am doing wrong
> >
> > Regards
> >
> > Jean-Jacques
>

Quick sanity check: What is the full part number of your LPC2294? What does it say on the package?

Remember that the original LPC2294 and LPC2294/00 did not have fast GPIO.
It only arrived with the LPC2294/01

Hope this helps,
Danish

--- In l..., "jdauchot" wrote:
>
> Hi
>
> I am trying to use FGIO on LPC2294 and I cannot get the ports to toggle.
>
> I have set SCS = 3 to enable Port 0 and Port 1 to go fast
>
> Then I use FIO1DIR ,FIO1SET , FIO1CLR etc
>
> Can anyone give me a clue what I am doing wrong
>
> Regards
>
> Jean-Jacques
>