lpcware

Can you use all pins as a general purpose port?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by GMO on Tue Aug 25 06:42:38 MST 2015
This is probably very easy to do but I am very new to coding and would like some help. I am using an 812 board. I want to create a simple demonstration where switches can turn LEDs on and off using an ‘if else’ command. I have written the code for the lights and the switches and it works fine for most pins.

However some pins have another function and I am having difficulty using them as a general purpose pin (and turn them high or low). The pins I am having difficulty with are:

PIO0_5: RESET function (pin is always HIGH)
PIO_2: SWDIO and TMS (pin always high)
PIO0_10 and PIO0_11: SDA and SCL (pins always low)

I want to know where the code is that controls these pins (which header file etc.) and how I should change it so that they are general ports.

Any help would be appreciated or a link to another thread on this topic 

Outcomes