| 数据搜索系统,热门电子元器件搜索 |
|
ST9 数据表(PDF) 103 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST9 数据表(HTML) 103 Page - STMicroelectronics |
|
103 / 146 page ![]() 103/146 ST9 USER GUIDE 4.8.1.3 Function Prototype Declarations Each of these functions can be called by the main program <mainc.c> or other functions for managing the ADC. They are defined in the <adc.c> file. The <adc.h> file function prototypes are: void INIT_ADC(void); void START_ADC(void); void STOP_ADC(void); void INIT_ADC_IT(void); void Enable_ADC_IT(void); 4.8.1.4 Defining the Functional Mode To initialize the peripheral mode, you can activate the define directive by removing the <</* */ >>. e.g.: In the <adc.h> file, you can select Continuous mode with: #define continuous /*#define single*/ 4.8.2 Peripheral Function File These files contain the peripheral management functions. The function prototypes are placed in the header file as explained before. The functional mode and the constants initialized in the header file modify the functions so that they can be used directly by the application program. Presentation of Peripheral Function Files:- 4.8.2.1 ADC File The ADC function file is <adc.c> and contains 6 functions initialized for using channel 15 of the ADC corresponding to I/O port P7.7. It performs 15 conversions and stores the converted values in chart.. Moreover, the analog watchdog is enabled on this channel and stops the se- ries of conversions if the value is not within the prescribed thresholds. Table 4. ADC.C Functions Function Description and Comments void INIT_ADC(void); Choice between Continuous and Single-shot modes. Possibility of initializ- ing the analog watchdog on channel A or/and B. void START_ADC(void); Choice between three triggers to start the conversions: internal, external or software. void STOP_ADC(void); This routine stops the ADC after a series of conversions. Afterwards, all power consuming logic is disabled (low power idle mode). |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |