how to program a potentiometer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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 all- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-12 1:26 AM
A potentiometer will give you an analogue signal; GPIOs are digital !
Look at the examples included with the Standard Peripheral Library...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-12 1:50 AM
which example should I look?
thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-12 3:29 AM
I suggest that you invest some time in taking a look through all of them - to familiarise yourself with what's available.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-12 6: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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-07-12 6: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