CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
397
Analog Interface
Figure 18-5. SAR Hardware Accelerator
, the SAR accelerator hardware is
interfaced to the analog array through the comparator output
and the analog array data bus. To create DAC output, val-
ues are written directly to the ACAP field in the DAC regis-
ter. To facilitate the sequencing of the DAC writes in the SAR
algorithm, the M8C is programmed to do a sequence of
READ, MODIFY, and WRITE instructions. This is an atomic
operation that consists of an I/O read (IOR) followed closely
by an I/O write (IOW). One example of an assembly level
instruction is as follows.
OR reg[DAC_REG],0
The effect of this instruction is to read the DAC register and
follow it closely in time by a write back. The OR instruction
does not modify the read data (it is ORed with ‘0’). The CPU
does not need to do any additional computation in conjunc-
tion with this procedure. The SAR hardware transparently
does the data modification during the read portion of the
cycle. The only purpose for executing this instruction is to
initiate a read that is modified by the SAR hardware, then to
follow up with a write that transfers the data back to the DAC
register.
During each I/O read operation, the SAR hardware over-
rides two bits of the data:
■
To correct the previous bit guess based on the current
comparator value.
■
To set the next guess (next least significant bit).
The CPU latches this SAR modified data, ORs it with ‘0’ (no
CPU modification), and writes it back to the DAC register. A
counter in the SAR hardware is used to decode which bits
are being operated on in each cycle. In this way, the capa-
bility of the CPU and the IOR/IOW control lines are used to
implement the read and write. Use the SAR accelerator
hardware to make the decisions and to control the values
written, achieving the optimal level of performance for the
current system.
The SAR hardware is designed to process six bits of a result
in a given sequence. A higher resolution SAR is imple-
mented with multiple passes.
18.2.1.2
Application Description
There are a number of ways to map a SAR6 module into the
analog array. A SAR6 can be created from 1 SC block, 2 SC
blocks, or 1 SC block and 1 CT block. In the following exam-
ple, the programming, the clock selection, connectivity,
inputs, of a two block SAR6 will be demonstrated.
This type of SAR6 is made up of 1 SC block that operates
as a DAC6, and 1 SC block that operates as a voltage sum-
mer and comparator. The 2 block SAR6 is placed in column
0 as shown in
Figure 18-6. SAR6 Module Example
DAC Register
Analog Data Bus
Analog
Input
System
Data Bus
SAR
Accelerator
M8C
Micro
DAC
CMP
Latch
CBUS
Driver
PHI1 or PHI2
SAR Accelerator
Input Mux
Comparator
Bus Outputs
from Other
Columns
Switched Capacitor Block
DB
Read
ASA10
(DAC6)
ASB20
(CMP)
Port 2[3]
CM
P BUS
Содержание CY8C28 series
Страница 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Страница 85: ...84 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Internal Main Oscillator IMO ...
Страница 93: ...92 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G External Crystal Oscillator ECO ...
Страница 97: ...96 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Phase Locked Loop PLL ...
Страница 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Страница 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 425: ...424 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Analog Reference ...
Страница 461: ...460 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Two Column Limited Analog System ...
Страница 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Страница 483: ...482 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Multiply Accumulate MAC ...
Страница 513: ...512 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Internal Voltage Reference ...
Страница 523: ...522 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Switch Mode Pump SMP ...
Страница 533: ...532 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G I O Analog Multiplexer ...
Страница 537: ...536 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Real Time Clock RTC ...
Страница 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...