English
Language : 

AN3260 Datasheet, PDF (1/24 Pages) STMicroelectronics – Building a thermometer using the STM8S-DISCOVERY
AN3260
Application note
Building a thermometer
using the STM8S-DISCOVERY
Application overview
This application demonstrates how to build a simple thermometer based on the STM8S-
DISCOVERY and the LM235 precision temperature sensor. The STM8S105C6T6
microcontroller reads the temperature values and transmits them through the UART
interface. The temperature values are then displayed on a terminal window (possibly based
on Windows HyperTerminal) of a PC connected to the UART through an RS232 cable.
Once the STM8S-DISCOVERY is powered up through an USB cable connected to the host
PC, an informative message is displayed on the terminal window and the user is prompted
to enter minimum and maximum temperature thresholds.
The current temperature is displayed on the terminal window every minute together with a
warning message when the temperature is out of range.
The minimum and maximum values of the temperature over one-hour period are recorded in
the MCU data EEPROM once per hour. They can be displayed any time by pressing a
pushbutton.
Even if it is built on an STM8S105C6T6, the STM8S-DISCOVERY can be used to evaluate
the main features of all STM8S microcontrollers.
Reference documents
I STM8S-DISCOVERY evaluation board user manual (UM0817).
I Developing and debugging your STM8S-DISCOVERY application code user manual
(UM0834).
I LM235 precision temperature sensor datasheet
I ST232C 5 V powered multi-channel RS-232 driver and receiver datasheet
December 2010
Doc ID 17836 Rev 1
1/24
www.st.com