180
Document # 001-20559 Rev. *D
Digital Blocks
17.1.7
Counter Function
A counter consists of a period register, a synchronous down
counter, and a compare register. The counter function is
identical to the timer function except for the following points:
■
The data input is a counter gate (enable), rather than a
capture input. Counters do not implement synchronous
capture. The DR0 register in a counter should not be
read when it is enabled.
■
The compare output is the primary output and the termi-
nal count (TC) is the auxiliary output (opposite of the
timer).
■
Terminal count output is full cycle only.
When the counter is disabled and a period value is written
into DR1, the period value is also loaded into DR0. When
the counter is enabled, the counter counts down until termi-
nal count (a count of 00h) is reached. On the next clock
edge, the period is reloaded and, on subsequent clocks,
counting continues. (Refer to the timing diagram for this
function on page
.)
The counter implements a compare function between DR0
and DR2. The compare signal is the primary function output.
Mode bit 1 sets the compare type (DR0 <= DR2 or DR0 <
DR2) and Mode bit 0 sets the interrupt type (terminal count
or compare).
The data input functions as a gate to counter operation. The
counter only counts and reloads when the data input is
asserted (logic 1). When the data input is negated (logic 0),
counting (including the period reload) is halted.
Counters may be chained in 8-bit blocks up to 32 bits.
17.1.7.1
Usability Exceptions
The following is a usability exception for the counter func-
tion.
1. DR0 may only be read (to transfer DR0 data to DR2)
when the block is disabled.
17.1.7.2
Block Interrupt
The counter block has a selection of two interrupt sources.
interrupt on terminal count (TC) and interrupt on compare
may be selected in Mode bit 0 of the function register.
■
Interrupt on Terminal Count
: The positive edge of ter-
minal count (auxiliary output) generates an interrupt for
this block. The timing of the interrupt follows the TC
pulse width setting in the control register.
■
Interrupt on Compare
: The positive edge of compare
(primary output) generates an interrupt for this block.
17.1.8
Dead Band Function
The dead band function generates output signals on both
the primary and auxiliary outputs of the block, see
. Each of these outputs is one
of a two-
phase, non-overlapping clock generated by this function.
The two clock phases are never high at the same time and
the period between the clock phases is known as the
. The width of the dead band time is determined by the
value in the period register. This dead band function can be
driven with a PWM as an input clock or it can be clocked
directly by toggling a bit in software using the Bit Bang inter-
face. If the clock source is a PWM, this makes a two output
PWM with guaranteed non-overlapping outputs. An active
asynchronous signal on the KILL data input disables both
outputs immediately.
The PWM with the Dead Band User Module configures one
or two blocks to create an 8- or 16-bit PWM and configures
an additional block as the dead band function.
A dead band consists of a period register, a synchronous
down counter, and a special dead band circuit. The DR2
register is only used to read the contents of DR0. As with the
counter, when the dead band is disabled and a period value
is written into DR1, the period value is also loaded into DR0.
(Refer to the timing diagrams for this function on page
.)
Figure 17-3. Dead Band Functional Overview
D
e
a
d
B
a
n
d
D
e
a
d
B
a
n
d
D
e
a
d
B
a
n
d
D
e
a
d
B
a
n
d
D
e
a
d
B
a
n
d
Primary Output
Auxiliary
Output
Dead
Band
Function
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...