Hello. I am a beginner and i am trying to use one of the ADCs on my stm32f103ze.I have been using the examples from keil, they are well written and understandable. The problem is, they dont have an example showing use of an ADC. I have read the example from the stm firmware library and they use a different way of of setting up things than the examples from keil so i understood nothing. Can anyone link me to an (understandable,keil-example-like) example describing setting up the adc, and receiving values from it?
I did some quick search.
===========================================================>
http://www.keil.com/dd/docs/arm/st/stm32f10x/stm32f10x_lib.h stm32f10x_lib.h
#ifndef __STM32F10x_LIB_H #define __STM32F10x_LIB_H /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_map.h" #ifdef _ADC #include "stm32f10x_adc.h" #endif /*_ADC */
" href= "http://code.google.com/p/plex-svn/source/browse/trunk/h103/stm32f10x.h?r=411"> code.google.com/.../stm32f10x.h stm32f10x.h
/** * @brief Analog to Digital Converter */ typedef struct { __IO uint32_t SR; __IO uint32_t CR1; __IO uint32_t CR2; __IO uint32_t SMPR1; __IO uint32_t SMPR2; __IO uint32_t JOFR1; __IO uint32_t JOFR2; __IO uint32_t JOFR3; __IO uint32_t JOFR4; __IO uint32_t HTR; __IO uint32_t LTR; __IO uint32_t SQR1; __IO uint32_t SQR2; __IO uint32_t SQR3; __IO uint32_t JSQR; __IO uint32_t JDR1; __IO uint32_t JDR2; __IO uint32_t JDR3; __IO uint32_t JDR4; __IO uint32_t DR; } ADC_TypeDef;
<===========================================================
I guess that, the problem is: the OP doesn't know how to use header files to access the registers.
"the OP doesn't know how to use header files to access the registers."
no one can help with that.