lpcware

LPC1114FN28/102 - Some GPIO will not changing state

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
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...

Outcomes