Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

AN3259 Datasheet(PDF) 9 Page - STMicroelectronics

Part # AN3259
Description  RS232 communications with a terminal using the STM8S-DISCOVERY
PDF  25 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3259 Datasheet(HTML) 9 Page - STMicroelectronics

Back Button AN3259 Datasheet HTML 5Page - STMicroelectronics AN3259 Datasheet HTML 6Page - STMicroelectronics AN3259 Datasheet HTML 7Page - STMicroelectronics AN3259 Datasheet HTML 8Page - STMicroelectronics AN3259 Datasheet HTML 9Page - STMicroelectronics AN3259 Datasheet HTML 10Page - STMicroelectronics AN3259 Datasheet HTML 11Page - STMicroelectronics AN3259 Datasheet HTML 12Page - STMicroelectronics AN3259 Datasheet HTML 13Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 9 / 25 page
background image
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



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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