ST STEVAL-ICB008V1 User manual

December 2010 Doc ID 17987 Rev 2 1/31
UM1002
User manual
STEVAL-ICB008V1 touch-sensing software library
demonstration kit based on STM8S207S8
Introduction
This touch-sensing software library demonstration kit is based on STMicroelectronics' 8-bit
microcontroller STM8S207S8. With this kit, users can familiarize themselves with the
functionality and the performance of STMicroelectronics' capacitive touch-sensing solution.
This kit is driven by software open library at http://www.st.com/internet/mcu/subclass/1428.jsp.
This is the complete, free source code to transform any 8-bit STM8 microcontroller into a
capacitive touchkey controller.
The STEVAL-ICB008V1 demonstration kit consists of 3 parts, a demonstration board, a PC
GUI program, and a USB cable (standard-A to mini-B). Powered by the PC USB port, the
demonstration board can be demonstrated in standalone. There are 19 LEDs indicating
touchpad information for 6 keys (K1, K2, K3, K4, K5 and K6), 5 crosses (C, UP, LEFT,
DOWN and RIGHT) and one (5 electrodes) slider and another 3 LEDs on the board indicate
the system general status (power, system, and key). With the PC GUI program, the STM8S
RC touch solution provides a simple platform to monitor more detailed operating information
and configure values of critical touch-sensing parameters in applications.
Figure 1. STM8S207S8 RC touch solution
www.st.com
www.BDTIC.com/ST

Contents UM1002
2/31 Doc ID 17987 Rev 2
Contents
1 General description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Advantages of STM8S RC touch solution . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Getting started with STM8S207S8 RC touch solution . . . . . . . . . . . . . . 6
2.1 Demonstration kit checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Demonstration board description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 PC GUI program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Driver installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 PC GUI program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.1 Main dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2.2 Configuration dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Appendix A Data format of log files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Appendix B Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
www.BDTIC.com/ST

UM1002 List of figures
Doc ID 17987 Rev 2 3/31
List of figures
Figure 1. STM8S207S8 RC touch solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. STM8S207S8 RC touch solution demonstration block diagram . . . . . . . . . . . . . . . . . . . . . . 4
Figure 3. STM8S207S8 RC touch board top view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 4. STM8S207S8 RC touch board bottom view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Figure 5. SWIM port pin bottom view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 6. Driver installation step 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 7. Driver installation step 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 8. Driver installation step 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 9. Driver installation step 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 10. Driver installation step 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 11. Driver installation step 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 12. Driver installation step 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 13. Driver installation step 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 14. Driver installation step 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 15. Driver installation step 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 16. Driver installation step 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 17. Driver installation step 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 18. Driver installation step 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 19. Driver installation step 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 20. Driver installation step 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 21. Driver installation step 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 22. Driver installation step 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 23. Driver installation step 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 24. PC GUI main dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 25. PC GUI configuration dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 26. Pop-up box for successful reading operation from demonstration board . . . . . . . . . . . . . . 23
Figure 27. Pop-up box for successful writing operation to demonstration board . . . . . . . . . . . . . . . . . 24
Figure 28. LED indication circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 29. Touch key and driven shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 30. MCU and USB to UART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 31. Power supply +5 V and +3.3 V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 32. LED indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
www.BDTIC.com/ST

General description UM1002
4/31 Doc ID 17987 Rev 2
1 General description
1.1 Advantages of STM8S RC touch solution
●Small outline with high density demonstration functions
●Easy demonstration kit which is powered by a USB port, additional power supply is not
required
●Two demonstration modes, offline and online
●Board functions are driven by the library which can be configured through the GUI
●Touchpad information logs on PC
●SWIM port is reserved for debug use.
1.2 Architecture
A block diagram of the STM8S207S8 RC touch solution demonstration is illustrated in
Figure 2, and contains a demonstration board, a PC GUI program, and a standard-A to mini-
B USB cable. The kit can be used in standalone (offline mode), or used along with the PC
GUI program (online mode) for advanced demonstration.
Figure 2. STM8S207S8 RC touch solution demonstration block diagram
In offline mode, the board is connected to the PC and the USB cable provides the power. By
touching each touchpad on the board, the corresponding LED on the board indicates the
touch-sensing status.
In online mode, the USB cable not only provides power supply to the demonstration board
but also data transform. Therefore, the USB driver needs to be installed prior to starting
communication. Thanks to the PC GUI program, some detailed information can be real-time
displayed or saved to the PC. Some critical configurations (e.g. threshold, de-bounce filter,
etc.) are able to be set to the board without entering the debugging procedure, and effected
immediately after setting is done through the PC GUI.
www.BDTIC.com/ST

UM1002 General description
Doc ID 17987 Rev 2 5/31
There is a reserved SWIM port, shown in Figure 2. The configuration between the debugger
is indicated by dashed arrows. This configuration is used to perform real-time debug, or
modify application firmware.
Recommended tools:
●Debugger: resonance RLink debugger/programmer for ST microcontrollers. And ST-
Link debugger and Flash programmer for STM8 and STM32 microcontrollers.
●Development environment: ST MCU Toolset with ST visual develop (STVD) IDE and
ST visual programmer (STVP) programming interface.
www.BDTIC.com/ST

Getting started with STM8S207S8 RC touch solution UM1002
6/31 Doc ID 17987 Rev 2
2 Getting started with STM8S207S8 RC touch solution
2.1 Demonstration kit checklist
The STM8S207S8 RC touch solution contains:
●STM8S207S8 RC touch board
●USB cable (standard-A to mini-B)
●Material disc including PC GUI program “STM8S RC Touch Demo.exe”, USB driver
“CP210x_VCP_Win98SE.exe”, and user manual (this document).
2.2 Demonstration board description
Figure 3 shows the top view of the demonstration board and Figure 4 shows the bottom
view.
Figure 3. STM8S207S8 RC touch board top view
Figure 4. STM8S207S8 RC touch board bottom view
!-V
!-V
www.BDTIC.com/ST

UM1002 Getting started with STM8S207S8 RC touch solution
Doc ID 17987 Rev 2 7/31
Board description
1. System status indication LEDs
– Power indicator illuminates once the board is powered. The power is obtained
through the USB cable
– System indicator blinks with 1 Hz rate when microprocessor is working. The
blinking rate slows down when MCU enters low power mode
– Key indicator illuminates once the key, slider, or cross direction touching has been
detected. Light is OFF when system has been reset
2. Key1~Key6
There is an indication LED inside each key electrode. Every touch event on Key1~Key6
toggles LED status. The LED lights ON and OFF correspond with key status.
3. Slider
The slider consists of five electrodes, which are, from left to right, channel 0, channel 1,
channel 2, channel 3, and channel 4 respectively (refer to Figure 3 and Section 3.2.1).
There are 8 indication LEDs above the electrodes displaying the current position of the
slider.
Note: The slider starts from the middle of the first electrode (channel 0) and ends up in the middle
of the fifth electrode (channel 4). Outside this area, the slider does not detect a position
change.
4. Cross keys
The center key has an indication LED inside the key electrode. Every touch on the
center key event toggles the LED status. The rest of the cross keys have their own LED
indicator near the electrode. Every touch event on those keys toggles the LED status.
The LED lights ON and OFF correspond with key status.
5. Dielectric
Dielectric is a 1.5 mm thickness Plexiglas sheet, which is used to isolate the user's
finger from the electrode on the PCB. It can be replaced by another dielectric with a
different thickness or material, and some parameters (e.g. threshold) need to be tuned
through the PC GUI program. Please refer to the AN2869 application note.
6. MCU
STM8S207S8, STMicroelectronics' standard 8-bit microprocessor.
7. SWIM port
The SWIM port is reserved for debug use. Please refer to Figure 5 for the pin
assignment.
www.BDTIC.com/ST

Getting started with STM8S207S8 RC touch solution UM1002
8/31 Doc ID 17987 Rev 2
Figure 5. SWIM port pin bottom view
8. USB connector
The USB connector is a mini-B receptacle for USB standard-A to mini-B cable.
!-V
N234
'.$
37)-
6$$
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 9/31
3 PC GUI program
A PC GUI program named “STM8S RC Touch Demo.exe” is designed to demonstrate more
detailed information of the demonstration kit, such as signal level, reference level, etc. It also
provides an interface for the user to configure some critical parameters of RC touch directly
through the USB connection without reloading the firmware under debug mode.
3.1 Driver installation
Communication between the board and PC is achieved by a USB to UART bridge controller
CP2102 manufactured by Silicon Laboratories Inc. Before starting communication, a driver
needs to be installed on Windows®. Please follow the procedures below:
●Step 1: run “CP210x_VCP_Win98SE.exe” in the disc, and click “Next” to proceed.
Figure 6. Driver installation step 1
www.BDTIC.com/ST

PC GUI program UM1002
10/31 Doc ID 17987 Rev 2
●Step 2: accept the license agreement and click “Next” to proceed.
Figure 7. Driver installation step 2
●Step 3: choose the installation directory and click “Next” to proceed. The default
directory is “c:\SiLabs\MCU\CP210x”.
Figure 8. Driver installation step 3
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 11/31
●Step 4: click “Install” to proceed.
Figure 9. Driver installation step 4
●Step 5: click “Finish” to exit installation program.
Figure 10. Driver installation step 5
www.BDTIC.com/ST

PC GUI program UM1002
12/31 Doc ID 17987 Rev 2
●Step 6: connect the demonstration board to the PC with the USB cable. New hardware
is detected.
Figure 11. Driver installation step 6
●Step 7: choose “No, not this time” in “Found New Hardware Wizard”, and click “Next” to
proceed.
Figure 12. Driver installation step 7
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 13/31
●Step 8: choose “Install from a list or specific location (Advanced)”, and click “Next” to
proceed.
Figure 13. Driver installation step 8
●Step 9: browse the directory where the driver is installed, and click “Next” to proceed.
Figure 14. Driver installation step 9
www.BDTIC.com/ST

PC GUI program UM1002
14/31 Doc ID 17987 Rev 2
●Step 10: install “CP210x USB Composite Device” by clicking “Continue Anyway”.
Figure 15. Driver installation step 10
●Step 11: click “Finish” to complete driver installation for “CP210x USB Composite
Device”.
Figure 16. Driver installation step 11
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 15/31
●Step 12: another new hardware is detected.
Figure 17. Driver installation step 12
●Step 13: choose “No, not this time” in “Found New Hardware Wizard”, and click “Next”
to proceed.
Figure 18. Driver installation step 13
www.BDTIC.com/ST

PC GUI program UM1002
16/31 Doc ID 17987 Rev 2
●Step 14: choose “Install from a list or specific location (advanced)”, and click “Next” to
proceed.
Figure 19. Driver installation step 14
●Step 15: browse the directory where the driver is installed, and click “Next” to proceed.
Figure 20. Driver installation step 15
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 17/31
●Step 16: install “CP210x USB to UART Bridge Controller” by clicking “Continue
Anyway”.
Figure 21. Driver installation step 16
●Step 17: click “Finish” to complete driver installation for “CP210x USB to UART Bridge
Controller”.
Figure 22. Driver installation step 17
www.BDTIC.com/ST

PC GUI program UM1002
18/31 Doc ID 17987 Rev 2
●Step 18: launch device manager (Path: My Computer →Properties →Hardware →
Device Manager) and expand “Ports (COM and LPT)” as shown in Figure 23. A virtual
COM port named “CP210x USB to UART Bridge Controller” is listed if the driver is
successfully installed. The port number is assigned by Windows automatically (or
reassigned manually).
Note: Never assign a number exceeding 8, otherwise the PC GUI program is not able to recognize
the COM port correctly.
Figure 23. Driver installation step 18
www.BDTIC.com/ST

UM1002 PC GUI program
Doc ID 17987 Rev 2 19/31
3.2 PC GUI program
Before running the PC GUI program, make sure the driver is properly installed, and the USB
cable is well connected.
3.2.1 Main dialog
Run “STM8S RC Touch Demo.exe”. The main dialog program is illustrated in Figure 24.
Figure 24. PC GUI main dialog
Main dialog layout
1. Communication setting
After choosing the virtual COM port listed in “Device Manager” (Figure 23), the button
is used to open or close the port. The LED icon turns on (green) to indicate that the port
is opened. When the port is not opened, the LED icon turns off (gray). Make sure the
virtual COM port has been recognized before the PC GUI program is opened.
Otherwise the port is not displayed in the dropdown list.
2. Data logging
Data logging is used to record events regarding touch-sensing. Of course, some
unexpected touching or system status change due to environmental conditions is
captured by the data logging function. Simple mode records only touch/release events
and the slider position changing events. However, full mode records all touch-sensing
information received from the demonstration board.
Data is saved in “STM8S RC Touch Demo_Simple.log” and “STM8S RC Touch
Demo_Full.log” respectively, which are located in the same directory as the PC GUI
!-V
www.BDTIC.com/ST

PC GUI program UM1002
20/31 Doc ID 17987 Rev 2
program. It is recommended to open the log files with Windows Excel. The record
format is described in Appendix A.
3. System configuration
Press the “Configuration” button to launch a configuration dialog which is described in
Section 3.2.2.
4. Slider position
The current position of the slider bar is indicated by this number.
5. Slider illustration
The current position of the slider bar is indicated by this illustration.
6. Slider touch-sensing information
The information is obtained from electrode pads Ch0, Ch1, Ch2, Ch3 and Ch4.
– “Sig” stands for signal level. The number shows present charging time to those
channels
– “Ref” stands for reference level. The number shows judgment benchmark of a
touch event. Normally, a signal is not less than the sum of the reference level. The
detected touch events are treated as valid
– “NRC” stands for noise rejection counter. During each IO acquisition, NRC
increases by 1. The MCU detects an incorrect measure once signal presence is
out of guard band
7. Cross touch-sensing information
The information is obtained from electrode pads up, down, left, right, and center. The
meaning of the table content of sig, ref, and NRC is the same as “slider touch-sensing
information”.
8. Cross illustration
With each touch of cross keys, the corresponding icon changes color. For the center
key the icon changes to red. For the direction keys the icon changes to blue. If no touch
is detected, the icon remains gray.
9. Key touch-sensing information
The information is obtained from electrode pads Key1, Key2, Key3, Key4, Key5, and
Key6. The meaning of the table content is the same as slider touch-sensing
information.
10. Key illustration
Once a touch of the Key electrode is detected, the corresponding icon turns to red. If no
touch of the key is detected, the icon remains gray.
www.BDTIC.com/ST
Table of contents
Other ST Motherboard manuals

ST
ST STM32439I-EVAL User manual

ST
ST STM32H735G-DK User manual

ST
ST EVAL-RHRICL1ATV1 User manual

ST
ST STM32L4R9I User manual

ST
ST STM32100B-EVAL User manual

ST
ST X-NUCLEO-IDW01M1 User manual

ST
ST STEVAL-PCC008V1 User manual

ST
ST EVAL-RHRPMPOL01 User manual

ST
ST STM32L152-EVAL Installation and operating instructions

ST
ST STSW-STUSB002 User manual