English
Language : 

AN3397 Datasheet, PDF (1/24 Pages) STMicroelectronics – Temperature sensor example using the STM8L-DISCOVERY board
AN3397
Application note
Temperature sensor example using the STM8L-DISCOVERY board
Introduction
This application note proposes two methods for measuring and displaying temperature
using the STM8L built-in temperature sensor connected to the STM8L-DISCOVERY board.
The two methods are illustrated in the application code example provided with this
application note within two configurable modes: normal and advanced.
More generally, this application note explains the care that should be taken with the
temperature sensor, and describes the peripheral settings and configuration required to
develop the temperature sensor application.
The temperature sensor application does not require any additional hardware. Once the
STM8L-DISCOVERY is powered up through a USB cable connected to the host PC, the
application immediately starts, and the chip temperature is continuously displayed on the
liquid crystal display (LCD). The minimum and maximum temperatures recorded over the
past runtime period are automatically stored by the application, and are available for display
by pressing the 'user' push button on the STM8L-DISCOVERY. The temperature tendency
information is displayed as a bar graph on the LCD.
Reference documents
■ STM8L-DISCOVERY user manual (UM0970)
■ Developing and debugging your STM8L-DISCOVERY application code user manual
(UM0991)
■ Getting started with STM8L-DISCOVERY user manual (UM1014)
■ STM8L15xx and STM8L162x microcontroller family reference manual (RM0031)
■ STM8L151x4, STM8L151x6, STM8L152x4, STM8L152x6 datasheet
■ STM8L151x8, STM8L152x8, STM8L151R6, STM8L152R6 datasheet
■ STM8L151C2/K2/G2/F2 and STM8L151C3/K3/G3/F3 datasheet
■ STM8L162R8 and STM8L162M8 datasheet
The above documents are available on www.st.com.
Table 1. Applicable products and tools
Type
Part number or product category
Microcontrollers
STM8L Ultra Low Power
Evaluation tools
STM8L-DISCOVERY
October 2012
Doc ID 018809 Rev 1
1/24
www.st.com