Defining GPIO ports as inputs
Hi there, I am fairly new to programming these chips, I am currently coding using the IAR Embedded Workspace and loading my program onto an STM32F100 LQFP48 chip.
Currently I have pins PB8, PB9, PB10, PB11, PB12, PA11, PA12, PB15 set up as outputs which power 8 LED's.
I am using to of the outputs to control a small DC motor using a H-Bridge. In order to control the movement of my DC motor I have a couple of micro-switches which limit the rotation of my motor. I need my program to be able to respond to signals from these micro-switches which requires defining some of my GPIO's on my chip as inputs.
I have a small PCB board for programming my chip and there are lots of test pins which I could solder onto, many of these are GPIO's such as PB0-PB2, presumably these would be fine.
Any help would be seriously appreciated.
Thanks
#lqfp48 #gpio #stm32f100