LPC1114FN28/102 - Some GPIO will not changing state

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC1114FN28/102 - Some GPIO will not changing state

330 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by milspect18 on Fri Nov 14 14:50:04 MST 2014
I am new to using the LPC1114FN28/102 and am having some issues with basic GPIO functionality.  I have written a very simple program to toggle all of the GPIO0 pins on and off and GPIO0_4 and GPIO0_5 do not seem to be working, though all others seem to be fine.

The program code is as follows:

#include "lpc111x.h"

// prototypes
void Delay();

int main()
{
    GPIO0DIR = 0x0FFF;    // set the GPIO0_0 through GPIO0_11 bits for output
  
    while (1)
    {
        GPIO0DATA = 0x0FFF;   // set GPIO0_0..11
        Delay();        // delay for visual effect
        GPIO0DATA = 0x0000;   // clear GPIO0_0..11
        Delay();        // delay for visual effect
    }
  
    return 0;
}

//*****************************************************************************
// @brief: this is just an empty while loop to eat processor cycles and control
//         flow of the program.  counter is volatile for optimization 
//         portability
//*****************************************************************************
void Delay()
{
    int volatile counter = 0;
    while (counter < 250000)
    {
        counter++;
    }
}


I have tried to set the bits in the alternate function registers as these pins share I2C functions...  I also tried to set just these bits individually, yet I cannot seem to get these to work...

I have the chip in a minimal environment on a breadboard with a 3.3v supply and an FTDI USB to Serial adapter for flashing.  I tried another chip I had here and got the same results...
Labels (1)
0 Kudos
2 Replies

313 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by milspect18 on Fri Nov 14 15:13:40 MST 2014
I am now trying to calculate the appropriate force to apply from my palm to my face...   Thank you for the reply!! 
0 Kudos

313 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Nov 14 15:03:32 MST 2014

Quote: milspect18
...GPIO0_4 and GPIO0_5 do not seem to be working...



They are I2C pins and Open Drain  :)
0 Kudos