lpcware

Help to understand GPIO

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by ivitro on Tue Oct 18 07:59:55 MST 2011
Hello guy I newer on LPCxpresso 1114, and I have some questions

I try change the example blink code,

what I does was,

configure 5 output in port2:

    GPIOSetDir(2, 4, 1);
    GPIOSetDir(2, 5, 1);
    GPIOSetDir(2, 6, 1);
    GPIOSetDir(2, 7, 1);
    GPIOSetDir(2, 8, 1);

but when I do example GPIOSetValue(2, 4, 1); or GPIOSetValue(2, 4, 0); noting happen pin4 continue in hight state but led continue blinky...


Second question is, how can I change clock?

it comes by default 48Mhz, but I want it run 2Mhz.

So, I grateful for help.

regards

Outcomes