| 数据搜索系统,热门电子元器件搜索 |
|
ST9 数据表(PDF) 109 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST9 数据表(HTML) 109 Page - STMicroelectronics |
|
109 / 146 page ![]() 109/146 ST9 USER GUIDE Table 11. SCI.C Functions 4.8.2.5 TIMER File Standard Timer function file is <st\timer.c> and contains 6 functions that are initialized for gen- erating a simple PWM signal using the Standard Timer (programmable duty cycle). Port used: – STDOUT Table 12. TIMER.C Functions FUNCTION DESCRIPTION AND COMMENTS void INIT_SCI(void); Initialization of general parameters dedicated to the SCI: - Baud Rate Generator: 9600 bauds. - Characters: Eight data bits, one stop bit, odd parity. - Pins... The baud rate generator must be initialized following this structure (BRGHR first and BRGLR at the end). void INIT_SCI_IT(void); Initialization of the IT: vector, priority. The only interrupt which is enabled is “character match”. void INTSCI_ReceiveMatch(void); This interrupt subroutine occurs when the SCI cell has received the matching character. In this example, it displays 0 on a 7-segment LED connected to port 4. FUNCTION DESCRIPTION AND COMMENTS void INIT_ST(void); Standard Timer initialization. It must be used before any use of the ST. It initializes the value loaded into the prescaler and into the counter. To use the ST in output mode, you must initialize the output pin in push- pull, alternate function. This means (PXC0R,PXC1R,PXC2R) = (1,1,0). void START_ST(void); Starts the Standard Timer. void STOP_ST (void); Stops the timer counter. void INIT_ST_IT(void); This routine configures the interrupts after each End of Count. Don't forget to initialize your start-up file correctly. void Enable_ST_IT(void); Enables the Standard Timer Interrupt. void INTST_EndCount(void); Interrupt subroutine which occurs after an end of count. |
|
链接网址 |
| 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 |