Document # 001-20559 Rev. *D
227
Analog Interface
18.4
Register Definitions
The following registers are associated with the Analog Interface and are listed in address order. Each register description has
an associated register table showing the bit structure for that register. For a complete table of analog interface registers, refer
to the
“Summary Table of the Analog Registers” on page 217
The bits that are grayed out throughout this manual are reserved bits and are not detailed in the register descriptions that fol-
low. Reserved bits should always be written with a value of ‘0’.
18.4.1
CMP_CR0 Register
The Analog Comparator Bus Register 0 (CMP_CR0) is used
to poll the analog column comparator bits and select column
interrupts.
This register contains two fields: COMP and AINT. By
default, the interrupt is the comparator bit. A rising edge on a
comparator bit causes an interrupt to be registered. How-
ever, if a bit in this field is set, the interrupt input for that col-
umn is derived from the falling edge of PHI2 clock for that
column (that is, the falling edge of PHI2 leaves a rising inter-
rupt signal). Firmware can use this capability to synchronize
to the current column clock.
Bits 7 to 4: COMP[x].
These bits are the read only bits cor-
responding to the comparator bits in each analog column.
They are synchronized to the column clock, and thus may
be reliably polled by the CPU.
Bits 3 to 0: AINT[x].
These bits select the interrupt source
for each column, as the input to the interrupt controller.
For additional information, refer to the
.
18.4.2
ASY_CR Register
The Analog Synchronization Control Register (ASY_CR) is
used to control SAR operation, except for bit 0, SYNCEN.
SYNCEN is associated with analog register write stalling
and is described in
“Analog Synchronization Interface (Stall-
.
The SAR hardware accelerator is a block of specialized
hardware designed to sequence the SAR algorithm for effi-
cient analog-to-digital conversion. A SAR ADC is imple-
mented conceptually with a DAC of the desired precision
and a comparator. This functionality is configured from one
or more PSoC blocks. For each conversion, the firmware ini-
tializes the ASY_CR register and sets the SIGN bit of the
DAC as the first guess in the algorithm. A sequence of OR
instructions (read, modify, write) to the ASxxxCR0 register is
then executed. Each of these OR instructions causes the
SAR hardware to read the current state of the comparator,
checking the validity of the previous guess. It either clears it
or leaves it set, accordingly. The next LSb in the DAC regis-
ter is also set as the next guess. Six OR instructions com-
plete the conversion of a 6-bit DAC.
The resulting DAC code, which matches the input voltage to
within one LSb, is then read back from the ASxxxCR0 regis-
ter.
Bits 6 to 4: SARCNT[2:0].
These bits are the SAR count
value and are used to initialize a three-bit counter to
sequence the six bits of the SAR algorithm. Typically, the
user initializes this register to ‘6’. When these bits are any
value other than ‘0’, a register read command to an SC
block is assumed to be part of a SAR sequence.
Assuming the comparator bus output is programmed for col-
umn 0, a typical firmware sequence is as follows.
mov reg[ASY_CR], 60h
// SAR count value=6,
// Sign=0, Col=0
or reg[ASD11CR0], 0
// Check sign, set bit 4
or reg[ASD11CR0], 0
// Check bit 4, set bit 3
or reg[ASD11CR0], 0
// Check bit 3, set bit 2
or reg[ASD11CR0], 0
// Check bit 2, set bit 1
or reg[ASD11CR0], 0
// Check bit 1, set bit 0
or reg[ASD11CR0], 0
// Check bit 0
Add.
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,64h
COMP[1:0]
AINT[1:0]
# : 00
#: Access is bit specific. Refer to the
Register Details chapter on page 47
.
Add.
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,65h
SARCNT[2:0]
SARSIGN
SARCOL[1:0]
SYNCEN
RW : 00
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 ...