English
Language : 

C8051F960-B-GM Datasheet, PDF (313/492 Pages) Silicon Laboratories – Ultra Low Power 128K, LCD MCU Family
C8051F96x
25.1. Counting Modes
The Pulse Counter supports three different counting modes: single counter mode, dual counter mode, and
quadrature counter mode. Figure 25.2 illustrates the three counter modes.
Single Counter Mode Example
PC0
Dual Counter Mode Example
PC1
PC0
PC1
PC0
Quadrature Counter Mode Example
clockwise
counter-clockwise
clockwise
Figure 25.2. Mode Examples
The single counter mode uses only one Pulse Counter pin PC0 (P1.0) to count pulses from a single input
channel. This mode uses only counter 0 and comparator. (Counter 1 and comparator 1 are not used.) The
single counter mode supports only one meter-encoder with a single-channel output. A single-channel
encoder is an effective solution when the metered fluid flows only in one direction. A single-channel
encoder does not provide any direction information and does not support bidirectional fluid metering.
The dual counter mode supports two independent single-channel meters. Each meter has its own indepen-
dent counter and comparator. Some of the global configuration settings apply to both channels, such as
pull-up current, sampling rate, and debounce time. The dual mode may also be used for a redundant count
using a two-channel non-quadrature encoder.
Quadrature counter mode supports a single two-channel quadrature meter encoder. The quadrature
counter mode supports bidirectional encoders and applications with bidirectional fluid flow. In quadrature
counter mode, clock-wise counts will increment counter 0, while counter clock-wise counts will increment
counter 1. Subtracting counter 1 from counter 0 will yield the net position. If the normal fluid flow is clock-
Rev. 1.0
313