| 전자부품 데이터시트 검색엔진 |
|
AN3259 데이터시트(PDF) 9 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3259 데이터시트(HTML) 9 Page - STMicroelectronics |
|
9 / 25 page ![]() AN3259 Software description Doc ID 17835 Rev 1 9/25 4 Software description 4.1 STM8S peripherals used by the application This application example uses the STM8S standard firmware library to control general purpose functions. It makes use of the following STM8S peripherals: UART2 UART2 is used to communicate with the terminal window running on the PC. It must be configured as follows: ● Baud rate = 9600 baud ● Word length = 8 bits ● One stop bit ● No parity ● Receive and transmit enabled ● UART2 clock disabled The communications are managed by polling each receive and transmit operation. Note: The terminal window and the STM8S UART peripheral must be configured with the same baud rate, word length, number of stop bits, and parity. Timer 3 (TIM3) TIM3 timer is configured as a timebase with interrupt enabled to control LD1 blinking speed. GPIOs The GPIOs are used to interface the MCU with external hardware. Port PD0 is configured as output push-pull low to drive LD1. BEEPER To drive the buzzer, the BEEPER peripheral outputs a signal of 1, 2, or 4 KHz on the BEEP output pin. 4.2 Configuring STM8S standard firmware library The stm8s_conf.h file of the STM8S standard firmware library allows to configure the library by enabling the peripheral functions used by the application. The following define statements must be present: #define _GPIO 1 enables the GPIOs #define _TIM3 1 enables TIM3 #define _BEEPER 1 enables the BEEPER #define _UART2 1 enables UART2 |
|
|
링크 URL |
| 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 |