![](http://datasheet.mmic.net.cn/120000/R5F21388SDFP_datasheet_3573603/R5F21388SDFP_650.png)
R01UH0241EJ0010 Rev.0.10
Page 619 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.2.2
Operation Example of Measurement Mode
The touch sensor control unit supports two types of measurement mode, single mode and scan mode.
Figure 25.10
Measurement Mode Operation Example
Start
CH2
measurement
TSCU interrupt
Start
CH0
measurement
CH1
measurement
CH2
measurement
CH3
measurement
CH4
measurement
CH5
measurement
TSCU interrupt
Start
CH17
measurement
CH16
measurement
CH15
measurement
CH14
measurement
CH13
measurement
CH12
measurement
CH11
measurement
CH10
measurement
CH9
measurement
CH8
measurement
CH7
measurement
CH6
measurement
CH5
measurement
CH4
measurement
CH3
measurement
CH2
measurement
CH1
measurement
CH0
measurement
TSCU interrupt
(1)
(2)
(1)
Notes:
1. An interrupt request to the interrupt control block is sent after the final data
transfer is completed (in Status 26).
2. Sections shown in dark shade:
Process the measurement value as invalid data.
CHC0 to CHC5, TSCUMD: Bits in TSCUCHC register
CHExx: Bits in TSIE0 to TSIE2 register
When detecting CH2 only
[Setting]
Select single mode
(TSCUMD = 0)
Set the enable bit (CHE02)
for CH2 to 1 (enabled)
Set bits CHC5 to CHC0 to
000010b (2) to select CH2
When detecting CH0, CH3,
and CH5 in ascending order
[Setting]
Select scan mode
(TSCUMD = 1)
Set the enable bits
(CHExx) for CH0, CH3,
and CH5 to 1 (enabled)
Set CHC5 to CHC0 to
000101b (5) to set the
maximum CH value to CH5
Set to ascending order
(UPDOWN = 0)
When detecting CH1 to CH3, CH6, CH8 to CH15, and CH17 in descending
order
[Setting]
Select scan mode (TSCUMD = 1)
Set the enable bits (CHExx) for CH1 to CH3, CH6, CH8 to CH15, and CH17
to 1 (enabled)
Set CHC5 to CHC0 to 010001b (17) to set the maximum CH value to CH17
Set to descending order (UPDOWN = 1)