![](http://datasheet.mmic.net.cn/120000/R5F21388SDFP_datasheet_3573603/R5F21388SDFP_647.png)
R01UH0241EJ0010 Rev.0.10
Page 616 of 730
Aug 05, 2011
R8C/38T-A Group
25. Touch Sensor Control Unit
Under development Preliminary document
Specifications in this document are tentative and subject to change.
25.3.1.8
Touch Detection Pin Selection
Touches are detected at the COMS input to CHxA0 or CHxA1.
The threshold value of the COMS input to CHxA0 or CHxA1 for touch detection is controlled by the I/O port
register.
Two types of comparison capacitors, CHxA0 (Cr0) and CHxA1 (Cr1), can be connected for touch detection.
Either of these capacitors can be selected by bits CHXAS00 to CHXAS35 in registers TSCHSEL0 to
TSCHSEL2 for each measurement channel.
This adjusts variations in measurement between the channels due to the electrode layout or other factors.
When measurement mode is scan mode and the pins are set to touch detection disabled by registers TSIE0 to
TSIE2, the measurement results must be processed as invalid data.
When measurement mode is single mode and the channels set by bits CHC0 to CHC5 in the TSCUCHC register
are set to touch detection disabled by registers TSIE0 to TSIE2, the measurement results must be processed as
invalid data.
CHE00 to CHE35: Bits in TSIE0 to TSIE2 register
CHXAS00 to CHXAS35: Bits in TSCHSEL0 to TSCHSEL2 register
25.3.1.9
Interrupt Generation
An interrupt request signal is output to the control block in Status 26 after measurement of all the channels
finishes.
Interrupt requests are acknowledged or disabled in the interrupt control block.
Clearing of an interrupt request signal is controlled by the SIF bit in the TSCUFR register.
25.3.1.10 Touch Detection Start Conditions
(1) Software trigger
When the TSCUCAP bit in the TSCUMR register is set to 0 (touch sensor measurement is started by
software trigger), a software trigger is selected. When the TSCUSTRT bit in the TSCUCR0 register is set
to 1 (measurement starts), detection starts.
(2) External trigger
When the TSCUCAP bit in the TSCUMR register is set to 1 (touch sensor measurement is started by
external trigger), an event input from the event link controller (ELC) is selected as external trigger mode.
In external trigger mode, make the ELC settings before starting touch sensor control unit measurement (the
TSCUSTRT bit = 1). Do not allow multiple event sources to be output from the ELC to the touch sensor
control unit.
Table 25.17
CHxA0/CHxA1 Measurement Processing
CHE00 to CHE35
CHXAS00 to CHXAS35
Measurement Processing
0
The measurement result is invalid data
0
1
The measurement result is invalid data
1
0
Measurement processing at the COMS input to CHxA0
1
Measurement processing at the COMS input to CHxA1