Component - Programmable Gain Amplifier (PGA) V1.60 Datasheet.pdf

PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
1.60
Features
•
Gain steps from 1 to 50
•
High input impedance
•
Selectable input reference
•
Adjustable power settings
General Description
The PGA implements an opamp-based, non-inverting amplifier with user-programmable gain.
This amplifier has high input impedance, wide bandwidth, and selectable input voltage reference.
It is derived from the SC/CT block.
The gain can be between 1 (0 dB) and 50 (+34 dB). The gain may be selected via configuration
or changed at run-time using the provided API. The maximum bandwidth is limited by the gainbandwidth product of the opamp and is reduced as the gain is increased. The input of the PGA
operates from rail to rail, but the maximum input swing (difference between Vin and Vref) is
limited to Vdda/Gain. The output of the PGA is class A, and is rail to rail for sufficiently high load
resistance.
The PGA is used when an input signal has insufficient amplitude. A PGA may be placed in front
of a comparator, ADC, or mixer to increase the amplitude of the signal to these components. The
PGA can be used as a unity gain amplifier to buffer the inputs of lower impedance blocks,
including Mixers or inverting PGAs. A unity gain PGA can also be used to buffer the output of a
VDAC or reference.
Input/Output Connections
This section describes the various input and output connections for the PGA. An asterisk (*) in
the list of I/Os indicates that the I/O may be hidden on the symbol under the conditions listed in
the description of that I/O.
Vin – Analog
Vin is the input signal terminal.
Cypress Semiconductor Corporation • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600
Document Number: 001-65706 Rev. **
Revised December 13, 2010
Programmable Gain Amplifier (PGA)
PSoC® Creator™ Component Data Sheet
Vref – Analog *
Vref is the input terminal for a reference signal.
The reference input can be connected to an external (to the component) reference or internal (to
the component) Vss (ground). When the reference is connected externally the routing resistance
is added to the internal resistors slightly decreasing the gain and increasing the gain tolerance.
Vout – Analog
Vout is the output voltage signal terminal. Vout is a function of (Vin - Vref) times the specified
Gain:
Vout = Vref + (Vin - Vref) * Gain
Parameters and Setup
Drag a PGA component onto your design and double-click it to open the Configure dialog.
Gain
This sets the initial gain of the PGA. The gain may be selected from the following set of allowed
values: 1 (default), 2, 4, 8, 16, 24, 32, 48, and 50.
Page 2 of 13
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
Power
This sets the initial drive power of the PGA. The power determines the speed with which the
PGA reacts to changes in the input signal. There are four power settings; Minimum, Low,
Medium (default), and High. Minimum Power setting results in the slowest response time and a
High Power setting results in the fastest response time.
Vref_Input
This parameter is used to select the input voltage reference. The options include:
•
"Internal Vss" – Uses a ground signal internal to the component
•
"External" (default) – Signal on the Vref terminal provides the amplifier reference.
The symbol displayed in PSoC Creator changes depending on the reference input selected.
Figure 1 PGA Configurations
Placement
There are no placement specific options.
Resources
The PGA uses one SC/CT block. Details on this block can be found in the applicable device data
sheet and Technical Reference Manual (TRM). These documents are available on the Cypress
web site.
API Memory
(Bytes)
Digital Blocks
Analog Blocks
Datapaths
Macro
cells
Status
Registers
Control
Registers
Counter7
Flash
RAM
Pins (per
External I/O)
1 SC/CT fixed
block
N/A
N/A
N/A
N/A
N/A
381
20
3
Document Number: 001-65706 Rev. **
Page 3 of 13
Programmable Gain Amplifier (PGA)
PSoC® Creator™ Component Data Sheet
Application Programming Interface
Application Programming Interface (API) routines allow you to configure the component using
software. The following table lists and describes the interface to each function. The subsequent
sections cover each function in more detail.
By default, PSoC Creator assigns the instance name "PGA_1" to the first instance of a
component in a given design. You can rename it to any unique value that follows the syntactic
rules for identifiers. The instance name becomes the prefix of every global function name,
variable, and constant symbol. For readability, the instance name used in the following table is
"PGA".
Function
Description
void PGA_Start(void)
Start the PGA.
void PGA_Stop(void)
Power down the PGA.
void PGA_SetGain(uint8 gain)
Set gain to pre-defined constants.
void PGA_SetPower(uint8 power)
Set drive power to one of four settings.
void PGA_Sleep(void)
Stops and saves the user configurations.
void PGA_Wakeup(void)
Restores and enables the user configurations.
void PGA_Init(void)
Initializes or restores default PGA configuration.
void PGA_Enable(void)
Enables the PGA.
void PGA_SaveConfig(void)
Empty function. Provided for future usage.
void PGA_RestoreConfig(void)
Empty function. Provided for future usage.
Global Variables
Variable
PGA_initVar
Page 4 of 13
Description
Indicates whether the PGA has been initialized. The variable is initialized to 0 and set to 1 the
first time PGA_Start() is called. This allows the component to restart without reinitialization after
the first call to the PGA_Start() routine.
If reinitialization of the component is required, then the PGA_Init() function can be called before
the PGA_Start() or PGA_Enable() function.
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
void PGA_Start(void)
Description:
This is the preferred method to begin component operation. Turns on the amplifier with the
power and gain based on the settings provided during the configuration or the current values
after a PGA_Stop() has been called.
Parameters:
None
Return Value:
None
Side Effects:
None
void PGA_Stop(void)
Description:
Turn off PGA and enable its lowest power state.
Note This API is not recommended for use on PSoC 3 ES2 and PSoC 5 ES1 silicon. These
devices have a defect that causes connections to several analog resources to be unreliable
when not powered. The unreliability manifests itself in silent failures (e.g. unpredictably bad
results from analog components) when the component utilizing that resource is stopped. It is
recommended that all analog components in a design should be powered up (by calling the
PGA_Start() APIs) at all times. Do not call the PGA_Stop() APIs.
Parameters:
None
Return Value:
None
Side Effects:
None. Does not affect power or gain settings
void PGA_SetPower(uint8 power)
Description:
Sets the drive power to one of four settings; minimum, low, medium, or high.
Parameters:
(uint8) power: See the following table for valid power settings.
Power Setting
Notes
PGA_MINPOWER
Minimum active power and slowest reaction time.
PGA_LOWPOWER
Low power and speed.
PGA_MEDPOWER
Medium power and speed.
PGA_HIGHPOWER
Highest active power and fastest reaction time.
Return Value:
None
Side Effects:
None
Document Number: 001-65706 Rev. **
Page 5 of 13
Programmable Gain Amplifier (PGA)
PSoC® Creator™ Component Data Sheet
void PGA_SetGain(uint8 gain)
Description:
Set the amplifier gain to a value between 1 and 50.
Parameters:
uint8 gain: See table below for valid gain settings.
Gain Setting
Notes
PGA_GAIN_01
Gain = 1
PGA_GAIN_02
Gain = 2
PGA_GAIN_04
Gain = 4
PGA_GAIN_08
Gain = 8
PGA_GAIN_16
Gain = 16
PGA_GAIN_24
Gain = 24
PGA_GAIN_32
Gain = 32
PGA_GAIN_48
Gain = 48
PGA_GAIN_50
Gain = 50
Return Value:
None
Side Effects:
None
void PGA_Sleep(void)
Description:
This is the preferred API to prepare the component for sleep. The PGA_Sleep() API saves
the current component state. Then it calls the PGA_Stop() function and calls
PGA_SaveConfig() to save the hardware configuration.
Call the PGA_Sleep() function before calling the CyPmSleep() or the CyPmHibernate()
function. Refer to the PSoC Creator System Reference Guide for more information about
power management functions.
Parameters:
None
Return Value:
None
Side Effects:
None
void PGA_Wakeup(void)
Description:
This is the preferred API to restore the component to the state when PGA_Sleep() was
called. The PGA_Wakeup() function calls the PGA_RestoreConfig() function to restore the
configuration. If the component was enabled before the PGA_Sleep() function was called,
the PGA_Wakeup() function will also re-enable the component.
Parameters:
None
Return Value:
None
Side Effects:
Calling the PGA_Wakeup() function without first calling the PGA_Sleep() or
PGA_SaveConfig() function may produce unexpected behavior.
Page 6 of 13
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
void PGA_Init(void)
Description:
Initializes or restores the component according to the customizer Configure dialog settings. It
is not necessary to call PGA_Init() because the PGA_Start() API calls this function and is the
preferred method to begin component operation.
Parameters:
None
Return Value:
None
Side Effects:
All registers will be set to values according to the customizer Configure dialog.
void PGA_Enable(void)
Description:
Activates the hardware and begins component operation. It is not necessary to call
PGA_Enable() because the PGA_Start() API calls this function, which is the preferred
method to begin component operation.
Parameters:
None
Return Value:
None
Side Effects:
None
void PGA_SaveConfig(void)
Description:
Empty function. Provided for future usage.
Parameters:
None
Return Value:
None
Side Effects:
None
void PGA_RestoreConfig(void)
Description:
Empty function. Provided for future usage.
Parameters:
None
Return Value:
None
Side Effects:
None
Sample Firmware Source Code
PSoC Creator provides numerous example projects that include schematics and example code
in the Find Example Project dialog. For component-specific examples, open the dialog from the
Component Catalog or an instance of the component in a schematic. For general examples,
open the dialog from the Start Page or File menu. As needed, use the Filter Options in the
dialog to narrow the list of projects available to select.
Refer to the "Find Example Project" topic in the PSoC Creator Help for more information.
Document Number: 001-65706 Rev. **
Page 7 of 13
Programmable Gain Amplifier (PGA)
PSoC® Creator™ Component Data Sheet
Functional Description
The PGA is constructed from a generic SC/CT block. Details on this block can be found in the
applicable device data sheet and TRM, available on the Cypress web site. The gain is selected
by adjusting two resistors, Ra and Rb. (see functional schematic, Figure 3). Ra may be set to
either 20K or 40K ohms. Rb is set between 20K and 1000K ohms to generate the gain values
selectable in either the parameter dialog or the SetGain function.
The block has a programmable capacitor in parallel with the feedback resistor, Rb. The value of
the capacitor is configured for each gain selection to achieve guaranteed stability. Reassigning
Rb values without also selecting the appropriate feedback capacitor value may result in PGA
instability. The user is strongly advised to use the provided APIs for gain changes.
Figure 2 PGA Schematic
Vin
Vout
Vref
Ra
Rb
The bandwidth of the PGA is determined by gain and power setting. Because of compensation
capacitor and stability requirements, the bandwidth is somewhat reduced from the absolute
maximum expected from the opamp's open loop gain-bandwidth.
Registers
The PGA component configuration is implemented in registers SC[0..3]_CR0, SC[0..3]_CR1 and
SC[0..3]_CR2. These can be accessed in user code by reference to the instantiated component
name, e.g., PGA_1_CR0_REG. The register contents can be reviewed in the PSoC Creator
component debug window. Refer to the applicable TRM, available on the Cypress web site, for a
detailed description of each register. The following registers are displayed in the PGA
component debug window.
Register:
PGA_1_CR0_REG
Name:
Switched Capacitor Control Register 0
Description:
Register bits 3:1 configure the switch capacitor block operating mode. This field is set to 110b
for the PGA component.
Page 8 of 13
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
Register:
PGA_1_CR1_REG
Name:
Switched Capacitor Control Register 1
Description:
Register fields configure drive mode, compensation capacitor values, and gain setting of the
switch capacitor block.
Register:
PGA_1_CR2_REG
Name:
Switched Capacitor Control Register 2
Description:
Register fields configure the input impedance, feedback impedance and the reference ground
selection for the switch capacitor block.
Register:
PGA_1_PM_ACT_CFG_REG
Name:
Active Power Mode Configuration Register 9
Description:
Register bits 3:0 enable power to each of the four switch capacitor blocks.
DC and AC Electrical Characteristics
The following values are based on characterization data. Specifications are valid for -40°C £ TA £
85°C and TJ £ 100°C except where noted. Unless otherwise specified in the tables below, all
Typical values are for TA = 25°C, Vdda = 5.0V, Power = High, output referenced to analog
ground, Vssa .
5.0V/3.3V DC Electrical Characteristics
Parameter
Description
Conditions
Min
Typ
Max
Units
Input
Vos
Input Offset
Voltage
All Power Modes (High, Med, Low,
Min)
na
3.5
10
mV
TCVos
Temp. coeff. input
offset voltage,
absolute value
All Power Modes (High, Med, Low,
Min)
na
6.0
12.3
uV/°C
Input capacitance
Positive gain, non-inverting input, not
including pin and routing capacitance
na
2.0
na
pF
Gain accuracy,
deviation from
nominal
G=1, Vref internally connected to Vss
0.01
0.15
+/-%
G=2, Vref internally connected to Vss
0.1
1.0
Ge4
G=4, Vref internally connected to Vss
0.5
1.35
Ge8
G=8, Vref internally connected to Vss
0.6
1.6
Ge16
G=16, Vref internally connected to Vss
0.7
2.5
Ge32
G=32, Vref internally connected to Vss
0.85
5.0
Cin
Ge1
Ge2
Document Number: 001-65706 Rev. **
Page 9 of 13
Programmable Gain Amplifier (PGA)
Parameter
PSoC® Creator™ Component Data Sheet
Description
Conditions
Ge50
Min
G=50, Vref internally connected to Vss
Typ
Max
2.1
5.0
1.2
2.5
G=2, Vref internally connected to Vss
8.6
20
Gd4
G=4, Vref internally connected to Vss
13
29
Gd8
G=8, Vref internally connected to Vss
15
35
Gd16
G=16, Vref internally connected to Vss
18
40
Gd32
G=32, Vref internally connected to Vss
38
75
Gd50
G=50, Vref internally connected to Vss
167
400
Gd1
Gain change vs
temp
Gd2
G=1, Vref internally connected to Vss
Vout_range
Output swing
Gain = 1, Rload = 100k to Vdda/2,
Difference from Vdda or Vssa
Idda
Operating current
Vdda=1.71 V, P=Low
Vdda=5.0 V, P=High
na
Units
ppm/°C
150
mV
700
1000
uA
1100
1350
uA
Figures
Histogram Input Offset Voltage
18
16
Typical Operating Current vs Temp, Power = Minimum
1200
Occurance
1100
Idda uA
14
12
1000
10
900
8
800
6
4
700
2
600
Page 10 of 13
Vos mV
6.0
4.0
2.0
0.0
-2.0
-4.0
-6.0
0
500
-50
5.5V
3.3V
2.7V
1.71V
0
50
deg C 100
150
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
Typical Operating Current vs Temp, Power = Low
Typical Operating Current vs Temp, Power = High
1200
1200
1100
1100
Idda uA
1000
1000
900
900
5.5V
3.3V
2.7V
1.71V
800
700
800
Idda uA
700
600
600
500
-50
5.5V
3.3V
2.7V
1.71V
0
50
deg C 100
150
500
-50
0
50
deg C 100
150
5.0V/3.3V AC Electrical Characteristics
Parameter
Description
Conditions
Min
Typ
Max
Units
GBW_H
Gain Bandwidth
Product, P=High
Gain=1, Vdda=5.0 V, 25 C
7.0
9.0
na
MHz
SR_G1
Slew Rate
20 - 80%, Gain=1, P=High
3.0
4.8
na
V/us
SR_G16
20 - 80%, Gain=16, P=High
0.5
0.87
na
V/us
SR_G50
20 - 80%, Gain=50, P=High
0.25
0.84
na
V/us
f = 100 kHz
48
f=100 kHz, P=High
na
PSRR_AC
Power supply
rejection ratio
Vn
Document Number: 001-65706 Rev. **
dB
42
na
nV/rtHz
Page 11 of 13
Programmable Gain Amplifier (PGA)
PSoC® Creator™ Component Data Sheet
Figures
Typical Gain vs Frequency, Power=High
Voltage noise, Vdda = 5.0V, Power=High
1000
40
20
nV/rtHz
G=50
G=32
G=16
G=8
G=4
G=2
G=1
dB
30
100
10
0
-10
1
10
100
kHz
1000
10000
10
0.01
0.1
1
kHz
10
100
1000
Bandwidth vs. Temperature, at Different Gain Settings,
Power = High
Data collection is currently in progress.
Page 12 of 13
Document Number: 001-65706 Rev. **
PSoC® Creator™ Component Data Sheet
Programmable Gain Amplifier (PGA)
Component Changes
This section lists the major changes in the component from the previous version.
Version
1.60
Description of Changes
Reason for Changes / Impact
Removed VDDA parameter from
component customizer
VDDA setting in the component is redundant and unnecessary for
multiple components. The parameter was removed and the
component queries the global setting for minimum VDDA in the
DWR and automatically enables the pump when necessary.
Configuration window created to
include Frequency response
graphs a better ease of use GUI.
Previous configuration window did not provide enough information
for ease of use.
SetGain constants corrected in the
header file
The constants provided for the SetGain API had incorrect values.
These have been corrected.
Added characterization data to
datasheet
Minor datasheet edits and updates
1.50
Added Sleep/Wakeup and
Init/Enable APIs.
To support low power modes, as well as to provide common
interfaces to separate control of initialization and enabling of most
components.
Removed Gain setting of 25.
The gain of 25 was too close to other values and therefore offered
no value.
Updated the symbol image and
Configure dialog.
These were updated to comply with corporate standards.
Changed the names of the registers Updated to comply with coding guidelines.
by adding "_REG."
Added specification table and
graphic placeholders
Data to be provided when characterization is complete.
© Cypress Semiconductor Corporation, 2009-2010. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation assumes no responsibility for the
use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or other rights. Cypress products are not warranted nor intended to
be used for medical, life support, life saving, critical control or safety applications, unless pursuant to an express written agreement with Cypress. Furthermore, Cypress does not authorize its
products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress
products in life-support systems application implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
PSoC® is a registered trademark, and PSoC Creator™ and Programmable System-on-Chip™ are trademarks of Cypress Semiconductor Corp. All other trademarks or registered trademarks
referenced herein are property of the respective corporations.
Any Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and
foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive, non-transferable license to copy, use, modify, create
derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating custom software and or firmware in support of licensee product to be used only in
conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as
specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without further notice to the materials described herein.
Cypress does not assume any liability arising out of the application or use of any product or circuit described herein. Cypress does not authorize its products for use as critical components in lifesupport systems where a malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress’ product in a life-support systems application
implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
Document Number: 001-65706 Rev. **
Page 13 of 13