Epson S1C17624 Technical Manual page 279

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

25.5
RFC Counters
The R/F converter includes two kinds of counters: measurement counter (MC) counting the reference element and
sensor oscillation clocks, and time base counter (TC) counting the TCCLK clock.
Measurement counter (MC)
The measurement counter is a 24-bit presettable up counter. Counting the reference oscillation clock and the
sensor oscillation clock for the same duration in time using this counter minimizes errors caused by voltage,
and unevenness of IC quality, as well as external parts and on-board parasitic elements. The counter values
should be corrected via software after the reference and sensor oscillation are completed according to the sen-
sor characteristics to determine the value being currently detected by the sensor.
Time base counter (TC)
The time base counter is a 24-bit presettable up/down counter. The time base counter counts up by TCCLK
during reference oscillation to measure the reference oscillation time. During sensor oscillation, it counts down
from the reference oscillation time and stops the sensor oscillation when it reaches 0x0. This means that the
sensor oscillation time becomes equal to the reference oscillation time. The value counted during reference
oscillation should be saved in the memory. It can be reused at the subsequent sensor oscillations omitting refer-
ence oscillations.
Counter initial value
To obtain the difference between the reference oscillation and sensor oscillation clock count values from the
measurement counter simply, appropriate initial values must be set to the counters before starting reference
oscillation and sensor oscillation. Connecting the reference element and sensor with the same resistance/ca-
pacitance will result <Initial value> = <Counter value at the end of sensor oscillation> (if no error introduced).
Setting a small initial value to the measurement counter improves measurement accuracy. However, the mea-
surement counter may overflow during sensor oscillation when the sensor value decreases below the reference
element value (the measurement will be canceled). The initial value for the measurement counter should be
determined taking the range of sensor value into consideration.
The time base counter should be cleared to 0x0 before starting reference oscillation.
25.6
Conversion Operations
The conversion operations by the R/F converter should be controlled in the following procedure regardless of the
operating mode: initial settings, reference oscillation control, and sensor oscillation control. The R/F converter
channels are controlled individually and both channels cannot operate simultaneously. This section describes these
control procedure. Although the following explanations assume that the internal oscillator circuit is used, the con-
trol procedures are the same even in external clock input mode. When the R/F converter is used in external clock
input mode, select which oscillation is performed either reference or sensor and determine the counter initial values
depending on the purpose for using.
25.6.1
initial Settings
Clock and pin configurations
(1) Select the R/F converter operating clock (TCCLK) and enable the clock supply. (See Section 25.3.)
(2) Configure the pins to be used for the R/F converter by switching from general-purpose input/output ports.
See the "I/O Ports (P)" chapter.
R/F converter channel and mode settings
(1) Set RFCEN/RFC_CTL register to 1 to enable the R/F converter.
(2) Select the channel to perform conversion using CHSEL/RFC_CTL register. Setting CHSEL to 0 (default)
selects Ch. 0 and setting 1 selects Ch.1.
(3) Set the oscillation mode using SMODE[1:0]/RFC_CTL register. (See Section 25.4.1.)
S1C17624/604/622/602/621 TeChniCal Manual
Seiko epson Corporation
25 R/F COnVeRTeR (RFC)
25-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents