2011-07-12 12:24 AM
hello,
I have the STM3210C eval board and there is a potentiometer linked at PC4. I want to divide all the range into ten parts. What should I do ? I have try to do Read Input Data, and all the function ''read...'' present in stm32f10x_gpio.c PC4 is always at zero.... Thank to all2011-07-12 01:26 AM
A potentiometer will give you an analogue signal; GPIOs are digital !
Look at the examples included with the Standard Peripheral Library...
2011-07-12 01:50 AM
which example should I look?
thanks2011-07-12 03:29 AM
I suggest that you invest some time in taking a look through all of them - to familiarise yourself with what's available.
2011-07-12 06:34 AM
When you get stuck on something, always Read The Fine Manual first.
And after you follow Andrew's advice, go to the STM32F105/7 data sheet, Section 3 Pin Descriptions, Table 5 Pin Definitions where you will see that PC4 in alternate function mode is ADC channel 14. Then go to RM0008 Reference Manual Section 9 that describes alternate functions. This documentation is available on ST's web site associated with the processor you are using. Cheers, Hal2011-07-12 06:34 AM
When you get stuck on something, always Read The Fine Manual first.
And after you follow Andrew's advice, go to the STM32F105/7 data sheet, Section 3 Pin Descriptions, Table 5 Pin Definitions where you will see that PC4 in alternate function mode is ADC channel 14. Then go to RM0008 Reference Manual Section 9 that describes alternate functions. This documentation is available on ST's web site associated with the processor you are using. Cheers, Hal