lpcware

LPC1114 0.0 and 0.4 as GPIO

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by MDimonte on Thu Apr 09 17:30:44 MST 2015
Hi,

I'm fairly new to microcontrollers, but I've been playing around with an LPC1114 and http://www.microbuilder.eu/Projects/LPC1114ReferenceDesign/CodeBaseDocumentation.aspx#pmuInit for my code base.

I'm having some issues setting 0.0 and 0.4 as high outputs. My code is as follows:


#include "core/gpio/gpio.h"
int main(void)
{
    gpioInit();
    IOCON_PIO0_4=IOCON_PIO0_4_FUNC_GPIO;
    IOCON_nRESET_PIO0_0=IOCON_nRESET_PIO0_0_FUNC_GPIO;

    gpioSetDir(0,0,gpioDirection_Output);
    gpioSetDir(0,4,gpioDirection_Output);
        while (1)
        {
            gpioSetValue(0,0,1);
            gpioSetValue(0,4,1);
        }
}


I can actually only get about half of the pins to work when I set them as outputs this way, however, these are the only two that are needed for my program. Any ideas?

Outcomes