Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Multiplexing PSoC® 4 SAR ADC Channels - KBA87497

lock attach
Attachments are accessible only for community members.

Multiplexing PSoC® 4 SAR ADC Channels - KBA87497

Anonymous
Not applicable

Version: *C

Translation - Japanese: PSoC®4 SAR ADC チャネル多重化 - KBA87497 - Community Translated (JA)

Question:

How do you multiplex PSoC® 4 SAR ADC channels?

Answer:

​When you need to measure several signals using a single ADC, the ADC must be timemultiplexed to convert those signals in succession. The PSoC 4 SAR ADC has a hardware sequencer that scans multiple input channels without CPU intervention. It is also possible to control the channels in firmware. The maximum number of channels is either 8 or 16 depending on the device. However, it also depends on the selected mode (single-ended/differential) and the availability of input sources.

                                                                                          

PSoC 4 FamilyMaximum Number of Channels
PSoC 4100/42008
PSoC 4100 BLE/4200 BLE16
PSoC 4100M/4200M16
PSoC 4200L16
PSoC 4100S16

The input sources for the SAR ADC can be from a fixed set of pins (Port P2[0] to P2[7] for PSoC 4100, PSoC 4200, PSoC 4100S, PSoC 4100M, PSoC 4200M, and PSoC 4200L, and Port 3[0] to P3[7] for PSoC 4100 BLE and PSoC 4200 BLE), internal signals from AMUXBUS-A/B, Continuous Time Block mini (CTBm), and an on-chip temperature sensor.

The sequencer scans through the input channels with zero switching overhead. That means that the aggregate sampling bandwidth is equal to 1 Msps whether it is for a single channel or distributed over several channels. The results of the A/D conversion are stored in 16-bit result registers (one per channel) after the scan.

The PSoC Creator™ configuration is simple. An example is shown with three differential input channels for the SAR ADC in PSoC 4200. The corresponding pins are P2[0], P2[1], P2[2], P2[3], P2[4], and P2[5]. Make sure that you use P2[0]/P2[1] as one differential pair, and do the same for the other pairs: P2[2]/P2[3], P2[4]/P2[5], and P2[6]/P2[7]. Note that this limitation is applicable only when the hardware sequencer is used and not when the firmware is used for selecting the input channels. Similar limitation is also applicable to the SAR ADC in PSoC 4100 BLE/ PSoC 4200 BLE that uses Port 3 pins.

Figure 1. Top Design Schematic

1.png

Figure 2. SARADC Channel Setup

2.png

Figure 3. Pin Selection in .cydwr File

3.png

Use the code example “ADC_Differential_Preamplifier” provided in PSoC Creator for reference.

Figure 4. Opening the Code Example

4.PNG

Attachments
0 Likes
1689 Views
Contributors