350
CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
Digital Blocks
17.2.1.2
Counter Register Definitions
There are three 8-bit Data registers and two Control registers (a 7 bit and an 8 bit).
explains the meaning of these
registers in the context of the Counter operation. Note that the descriptions of the registers are dependent on the enable/dis-
able state of the block. This behavior is only related to the enable bit in the Control register, not the data input that provides
the counter gate (unless otherwise noted). The Control registers are described beginning with section
.
Note
DR0 may only be read (to transfer DR0 data to DR2) when the block is disabled.
17.2.1.3
Dead Band Register Definitions
There are three 8-bit Data registers and a 3-bit Control register.
explains the meaning of these registers in the
context of Dead Band operation. The Control registers are described beginning with section
.
Note
DR0 may only be read (to transfer DR0 data to DR2) when the block is disabled.
Table 17-12. Counter Data Register Descriptions
Name
Function
Description
DR0
Count Value
Not directly readable or writeable.
During normal operation, DR0 stores the current count of a synchronous down counter.
When disabled, a write to the DR1 period register is also simultaneously loaded into DR0 from the data bus.
In KILL-Reload mode DR1 period data is loaded into DR0 at each rising edge of block clock when KILL is asserted.
When disabled or the data input (counter gate) is low, a read of DR0 returns 00h to the data bus and transfers the contents
of DR0 to DR2. This register should not be read when the counter is enabled and counting.
DR1
Period
Write only register.
Data in this register sets the period of the count. The actual number of clocks counted is 1.
A period of 00h gives a constant logic high on the auxiliary output.
When disabled, a write to this register also transfers the period value directly into DR0.
When enabled, if the block frequency is 24 MHz or below, this register may be written to at any time, but the period will only
be reloaded into DR0 in the clock following a TC. If the block frequency is 48 MHz, the Terminal Count or Compare Interrupt
should be used to synchronize the new period register write; otherwise, the counter can be incorrectly loaded.
DR2
Compare
Read write register.
DR2 functions as a Compare register.
When enabled, the compare output is computed using the compare type (set in the function register mode bits) between
DR0 and DR2. The result of the compare is output to the primary output.
When disabled or the data input (counter gate) is low, a read of DR0 will transfer the contents of DR0 into DR2.
DR2 may be written to when the function is enabled or disabled.
In DR2-buffer mode in counter running, the data written to DR2 is stored first, then transferred to DR2 register when DR0 is
being reloaded.
Table 17-13. Dead Band Register Descriptions
Name
Function
Description
DR0
Count Value
Not directly readable or writeable.
During normal operation, DR0 stores the current count of a synchronous down counter.
When disabled, a write to the DR1 period register is also simultaneously loaded into DR0 from the data bus.
When disabled, a read of DR0 returns 00h to the data bus and transfers the contents of DR0 to DR2.
DR1
Period
Write only register.
Data in this register sets the period of the dead band count. The actual number of clocks counted is 1. The mini-
mum period value is 00h, which sets a dead band time of one clock.
When disabled, a write to this register also transfers the period value directly into DR0.
When enabled, if the block frequency is 24 MHz or below, this register may be written to at any time, but the period will only
be reloaded into DR0 in the clock following a Terminal Count (TC). If the block frequency is 48 MHz, the Terminal Count or
Compare Interrupt should be used to synchronize the new period register write; otherwise, the counter can be incorrectly
loaded.
DR2
Buffer
When disabled, a read of DR0 transfers the contents of DR0 into DR2.
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...