Download Print this page

Epson S1C31D50 Technical Instructions page 329

Cmos 32-bit single chip microcontroller
Hide thumbs Also See for S1C31D50:

Advertisement

20.4. Operations
20.4.1. Initialization
The RFC should be initialized with the procedure shown below.
1. Configure the RFC_nCLK.CLKSRC[1:0] and RFC_nCLK.CLKDIV[1:0] bits. (Configure operating clock)
2.
Set the following bits when using the interrupt:
Write 1 to the interrupt flags in the RFC_nINTF register.
-
Set the interrupt enable bits in the RFC_nINTE register to 1.
-
3. Assign the RFC input/output function to the ports.
4. Configure the following RFC_nCTL register bits:
RFC_nCTL.EVTEN bit
-
RFC_nCTL.SMODE[1:0] bits
-
Set the RFC_nCTL.MODEN bit to 1.
-
20.4.2. Operating Modes
The RFC has two oscillation modes that use the RFC internal oscillation circuit and an external clock
input mode for measurements using an external input clock. The channels may be configured to a
different mode from others.
Oscillation mode
The oscillation mode is selected using the RFC_nCTL.SMODE[1:0] bits.
DC oscillation mode for resistive sensor measurements
This mode performs measurements by DC driving the reference resistor and the resistive
sensor to oscillate. Set the RFC into this mode when a DC bias resistive sensor is connected.
This mode allows connection of two resistive sensors to a channel.
AC oscillation mode for resistive sensor measurements
This mode performs measurements by AC driving the reference resistor and the resistive
sensor to oscillate. Set the RFC into this mode when an AC bias resistive sensor is connected.
One resistive sensor only can be
External clock input mode (event counter mode)
This mode enables input of external clock/pulses to perform counting similar to the
internal oscillation clock. A sine wave may be input as well as a square wave (for the
threshold value of the Schmitt input, refer to "R/F Converter Characteristics, High level
Schmitt input threshold voltage V
the "Electrical Characteristics" chapter). This function is enabled by setting the RFC_nCTL.
EVTEN bit to 1. The measurement procedure is the same as when the internal oscillation
circuit is used.
20.4.3. RFC Counters
The RFC incorporates two counters shown below.
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 of 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 oscillations are completed according to the sensor characteristics to determine the value
being currently detected by the sensor.
Time base counter (TC)
20-4
(Refer to the "I/O Ports" chapter.)
(Enable/disable external clock input mode)
(Select oscillation mode)
(Enable RFC operations)
connected to a channel.
and Low level Schmitt input thresh- old voltage V
T+
Seiko Epson Corporation
(Clear interrupt flags)
(Enable interrupts)
S1C31D50 TECHNICAL MANUAL
" in
T-
(Rev. 1.00)

Advertisement

loading