| 数据搜索系统,热门电子元器件搜索 |
|
ST9 数据表(PDF) 102 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST9 数据表(HTML) 102 Page - STMicroelectronics |
|
102 / 146 page ![]() 102/146 ST9 USER GUIDE 4.8 PERIPHERAL INITIALIZATION All the ST9 peripherals have a large number of configuration options. This makes them highly adaptable, but has a complex initialization procedure. To help you to use the peripherals easily, you can find all the initialization programs on the <http://www.stmcu.com> internet site. The purpose of these programs is to give you C language programs to get started with pro- gramming each peripheral. This program package consists of a Header file, a peripheral func- tion, a startup and a main program for each peripheral. The startup (crtbegin.spp) and the main (main.c) files are not explained here. Have a look at these files for more details. All you now have to know is that whenever an interrupt subroutine is used, the startup program is initialized with the interrupt subroutine address. For example the INTADC_EndConv() ADC interrupt subroutine address declared in the file <adc.c> is loaded in the startup routine <crtbegin.spp> at the Interrupt Vector Register loca- tion. 4.8.1 initialization Header File The initialization header file defines all the constants, the file to be included, the function pro- totypes and the peripheral mode. The initialization header file has to be included any time the peripheral is referenced. The next section uses the Analog to Digital Converter peripheral file as an example. The ADC initializa- tion header file is <adc.h>. 4.8.1.1 Constants already Initialized and to be Initialized The <adc.h> file is complementary to the <ad_c_16.h> header file located in the toolchain header files directory, with the other peripheral header files. The 16 initialized constants, CHANNEL0 to CHANNEL15, give you the 16 possibilities of ini- tializing the non-initialized constant AD_CHANNEL. This constant will initialize the AD_CLR1 ADC Control Logic Register1 in the <adc.c> file. 4.8.1.2 Files to be Included The files to be included contain other initialized constants like in the previous <adc.h> file. |
|
链接网址 |
| 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 |