PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) 1.20 Features Follower or Opamp configuration Rail-to-rail inputs and output Output direct low resistance connection to pin 1mA or 10mA output current Internal connection for follower General Description The Opamp operates as an off-the-shelf operation amplifier. A direct connection is made between the Opamp output and a dedicated GPIO pin for a low output resistance. Two output modes (Internal only and Output to pin) are provided to drive internal or external signals respectively. The Output to pin may drive both internal (SAR component) and external signals. The user also has control of different overall power levels that provide a tradeoff between power and bandwidth. For all devices, except PSoC 4100/PSoC 4200, the Opamp can operate in Deep Sleep power mode. Note External resistors are required to perform amplification. When to Use the Opamp The following is a list of common use cases for the Opamp component: Gain for SAR ADC High impedance buffer for SAR ADC General purpose signal amplifier Active filter Cypress Semiconductor Corporation Document Number: 002-10780 Rev. *A • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600 Revised May 4, 2016 PSoC 4 Operational Amplifier (Opamp) PSoC® Creator™ Component Datasheet Input/Output Connections This section describes various input and output connections for the Opamp. Positive Input – Analog Input When the Opamp is configured in follower Mode, this I/O is the voltage input. If the Opamp is configured in Opamp Mode, this I/O acts as the standard Opamp noninverting input. Negative Input – Analog Input* When the Opamp component is configured in Opamp Mode, this I/O is the normal inverting input. When the Opamp is configured in Follower Mode, this I/O is hard-connected to the output and the I/O is unavailable. Vout – Analog output The output can be directly connected to a pin and/or routed to an internal load using the Output parameter. The drive strength is selectable as either Output to pin or Internal only. Connections to pins require the Output to pin setting. Internal connections can operate with either the Internal only or Output to pin setting, but should normally be configured for Internal only. Component Parameters Drag Opamp onto your design and double-click it to open the Configure dialog. The Opamp provides the following parameters: Page 2 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) Mode This parameter allows you to select between two configurations: Opamp and Follower. Opamp is the default configuration. In this mode, all three terminals are available for connection. In the follower mode, the inverting input is internally connected to the output to create a voltage follower. Power/Bandwidth The Opamp works over a wide range of operating currents. Higher operating current increases the Opamp bandwidth. The Power/Bandwidth parameter allows you to select the power level: High, Medium, and Low. Output This parameter selects an output mode: Internal only – internal connections or Output to pin – connection to pin (external). Compensation The opamp offers three compensation settings: Low, Med and High. This allows reducing the compensation (hence increase the bandwidth) when the Opamp’s loop gain is reduced. Deep sleep operation This parameter is not available for PSoC 4100/PSoC 4200 devices. It enables the component operation in Deep Sleep mode. If this option is enabled, a “DSOp” label will be displayed under the symbol. If two Opamps of the same CTB/CTBm block are used in the project, both must have the same Deep Sleep settings. Note Only dedicated pins may be used for operation in Deep Sleep mode. Note For correct operation in Deep Sleep mode, the VDDA must be larger than 2.5 V. The boost pump does not operate in Deep Sleep mode. Document Number: 002-10780 Rev. *A Page 3 of 14 PSoC 4 Operational Amplifier (Opamp) PSoC® Creator™ Component Datasheet 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 "Opamp_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 "Opamp" Functions Function Description Opamp_Start() Performs all of the required initialization for the component and enables power to the block. Opamp_Stop() Turns off the Opamp block. Opamp_Init() Initializes or restores the component according to the customizer Configure dialog settings. Opamp_Enable() Activates the hardware and begins component operation. Opamp_SetPower() Sets the drive power to one of three settings; LOW_POWER, MED_POWER, HIGH_POWER. Opamp_PumpControl() Turn the boost pump on or off. Opamp_Sleep() This is the preferred API to prepare the component for sleep. Opamp_Wakeup() This is the preferred API to restore the component to the state when Opamp_Sleep() was called. void Opamp_Start(void) Description: Performs all of the required initialization for the component and enables power to the block. The first time the routine is executed, the Power level, Mode, and Output mode are set. When called to restart the Opamp following a Stop() call, the current component parameter settings are retained. Parameters: None Return Value: None Side Effects: None Page 4 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) void Opamp_Stop(void) Description: Turn off the Opamp block. Parameters: None Return Value: None Side Effects: Does not affect the Opamp mode or power settings void Opamp_Init(void) Description: Initializes or restores the component according to the customizer Configure dialog settings. It is not necessary to call Init() because the Start() API calls this function and is the preferred method to begin the component operation. Parameters: None Return Value: None Side Effects: All the registers will be set to values according to the customizer Configure dialog. void Opamp_Enable(void) Description: Activates the hardware and begins the component operation. It is not necessary to call Enable() because the Start() API calls this function, which is the preferred method to begin component operation. Parameters: None Return Value: None Side Effects: None void Opamp_SetPower(uint32 power) Description: Sets the opamp to one of three power levels.. Parameters: (uint32) power: Power levels. See table below. Parameter Value Return Value: Description Opamp_LOW_POWER Lowest active power. Opamp_MED_POWER Medium power. Opamp_HIGH_POWER Highest active power. None Document Number: 002-10780 Rev. *A Page 5 of 14 PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) void Opamp_PumpControl(uint32 onOff) Description: Allows the user to turn the Opamp’s boost pump on or off. By Default the Opamp_Start() function turns on the pump. Use this command to turn it off. The boost must be turned on when the supply is less than 2.7 volts and off if the supply is more than 4 volts. Parameters: (uint32) onOff: Control the pump. See the table below. Parameter Value Description Opamp_PUMP_OFF Turn off the pump Opamp_PUMP_ON Turn on the pump Return Value: None Side Effects: Turning this pump off will reduce the Opamp input range by 1.8 volts or (Vssa to (Vdda – 1.8 volts)). void Opamp_Sleep(void) Description: This is the preferred API to prepare the component for sleep. The Sleep() API saves the current component state and stops the component. Call the Sleep() function before calling the CySysPmDeepSleep() or the CySysPmHibernate() functions. If the "Deep sleep operation" is enabled then this function does nothing and the component continues to operate during low power state. Parameters: None Return Value: None Side Effects: None void Opamp_Wakeup(void) Description: This is the preferred API to restore the component to the state when Sleep() is called. If the component has been enabled before the Sleep() function is called, the Wakeup() function will also re-enable the component. If the "Deep sleep operation" is enabled then this function does nothing because the component operates during low power state as well as in active state. Parameters: None Return Value: None Side Effects: Calling the Wakeup() function without first calling the Sleep() function may produce unexpected behavior. Page 6 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) 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. MISRA Compliance This section describes the MISRA-C:2004 compliance and deviations for the component. There are two types of deviations defined: project deviations – deviations that are applicable for all PSoC Creator components specific deviations – deviations that are applicable only for this component This section provides information on the component-specific deviations. The project deviations are described in the MISRA Compliance section of the System Reference Guide along with information on the MISRA compliance verification environment. The Opamp component has the following specific deviations: MISRA-C: 2004 Rule Rule Class (Required/Advisory) 19.7 A Rule Description Description of Deviation(s) A function is used in preference Deviated since function-like macros to a function-like macro. are used to allow more efficient code. API Memory Usage The component memory usage varies significantly, depending on the compiler, device, number of APIs used and component configuration. The following table provides the memory usage for all APIs available in the given component configuration. The measurements have been done with the associated compiler configured in the Release mode with an optimization set for Size. For a specific design, the map file generated by the compiler can be analyzed to determine the memory usage. PSoC 4 (GCC) Configuration Flash Bytes SRAM Bytes Disabled 240 9 Enabled 188 8 Deep sleep operation Document Number: 002-10780 Rev. *A Page 7 of 14 PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) Functional Description This component is a basic operational amplifier. You may configure power, output strength, and interconnect the Opamp to other components. Low resistive connections are made from the Opamp to three selected pins to provide the optimal performance. Using the Compensation option There are recommended settings for the Compensation option: Load Capacitance Loop Gain Less than 50 pF 50pF to 125 pF 1-6 Medium High 7 or more Low Medium These settings are applicable for the Output to pin setting, which is capable to drive a pin. 125 pF is the maximum load capacitance for this output. Placement Each Opamp is directly connected to specific GPIOs along with being connected to the internal fabric. The Output connection to a GPIO requires the use of the directly connected pin. Refer to the device datasheet for the part being used for the specific physical pin connections. Registers See the chip Technical Reference Manual (TRM) for more information about the registers. Component Debug Window PSoC Creator allows viewing debug information about the components in the design. Each component window lists the memory and registers for the instance. For detailed hardware registers descriptions, refer to the appropriate device technical reference manual. For detailed UDB registers descriptions used in the component, refer to the Registers section of this datasheet. To open the Component Debug window: 1. Make sure the debugger is running or in break mode. 2. Choose Windows > Components… from the Debug menu. 3. In the Component Window Selector dialog, select the component instances to view and click OK. Page 8 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) The selected Component Debug window(s) will open within the debugger framework. Refer to the "Component Debug Window" topic in the PSoC Creator Help for more information. Resources The Opamp uses one of the opamp (Constant Time Block – mini (CTBm)) blocks in PSoC 4. No other resources are required. DC and AC Electrical Characteristics Specifications are valid for –40 °C ≤ TA ≤ 85 °C and TJ ≤ 100 °C, except where noted. Specifications are valid for 1.71 V to 5.5 V, except where noted. Note Final characterization data for PSoC 4000S, PSoC 4100S and PSoC Analog Coprocessor devices is not available at this time. Once the data is available, the component datasheet will be updated on the Cypress web site.. DC Specifications Parameter Description Conditions Min Typ Max Units IDD Opamp Block current. No load. – – – – IDD_HI Power = high – 1000 1300 µA IDD_MED Power = medium – 320 500 µA IDD_LOW Power = low – 250 350 µA IDD Opamp Block current. VDD = 1.8 V. No load. For PSoC 4200 BLE family – – – – IDD_HI Power = high For PSoC 4200 BLE family – 1000 1300 µA IDD_MED Power = medium For PSoC 4200 BLE family – 500 – µA IDD_LOW Power = low For PSoC 4200 BLE family – 250 350 µA IDD_HI Power = high For PSoC 4100M/ PSoC 4200M/ PSoC 4200L – 1100 1850 µA IDD_MED Power = medium For PSoC 4100M/ PSoC 4200M/ PSoC 4200L – 550 950 µA IDD_LOW Power = low For PSoC 4100M/ PSoC 4200M/ PSoC 4200L – 150 350 µA IOUT_MAX VDDA ≥ 2.7 V, 500 mV from rail – – – – IOUT_MAX_HI Power = high 10 – – mA IOUT_MAX_MID Power = medium 10 – – mA IOUT_MAX_LO Power = low – 5 – mA IOUT VDDA = 1.71 V, 500 mV from rail – – – – Document Number: 002-10780 Rev. *A Page 9 of 14 PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) Parameter Description Conditions Min Typ Max Units 4 – – mA IOUT_MAX_MID Power = medium 4 – – mA IOUT_MAX_LO Power = low – 2 – mA VIN Charge pump on, VDDA ≥ 2.7 V –0.05 – VDDA V – 0.2 VCM Charge pump on, VDDA ≥ 2.7 V –0.05 – VDDA V – 0.2 VOUT VDDA ≥ 2.7 V – – – VOUT_1 Power = high, Iload=10 mA 0.5 – VDDA V – 0.5 VOUT_2 Power = high, Iload=1 mA 0.2 – VDDA V – 0.2 VOUT_3 Power = medium, Iload=1 mA 0.2 – VDDA V – 0.2 VOUT_4 Power = low, Iload=0.1mA 0.2 – VDDA V – 0.2 VOS Offset voltage High mode 1 ±0.5 1 mV VOS Offset voltage Medium mode – ±1 – mV VOS Offset voltage Low mode – ±2 – mV VOS_DR Offset voltage drift High mode –10 ±3 10 µV/C VOS_DR Offset voltage drift Medium mode – ±10 – µV/C VOS_DR Offset voltage drift Low mode – ±10 – µV/C Cload Stable up to maximum load. Performance specs at 50 pF. – – 125 pF CMRR DC VDDD = 3.6 V 70 80 – dB CMRR DC For PSoC 4200 BLE family 65 70 – dB IOUT_MAX_HI Power = high VDDD = 3.6 V, High-Power Mode CMRR DC Common mode rejection ratio. For PSoC 4100M/ High Power mode. Common PSoC 4200M/ PSoC 4200L Model Voltage Range from 0.5V VDDD = 3.6 V to VDDA - 0.5V. 60 70 – dB PSRR At 1 kHz, 100 mV ripple 70 85 – dB VDDD = 3.6 V Deep-Sleep Mode (For PSoC 4200 BLE family; only guaranteed for VDDA > 2.5 V) IDD_DS Current – 15 – μA Vos_DS Offset voltage – 5 – mV Vos_dr_DS Offset voltage drift – 20 – μV/°C Page 10 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet Parameter PSoC 4 Operational Amplifier (Opamp) Description Conditions Min Typ Max Units Vout_DS Output voltage 0.2 – VDD– 0.2 V Vcm_DS Common mode voltage 0.2 – VDD– 1.8 V Deep-Sleep Mode (For PSoC 4100M/PSoC 4200M/ PSoC 4200L; only guaranteed for VDDA ≥ 2.7 V) Mode 2 is lowest current range. Mode 1 has higher GBW. IDD_HI_M1 Mode 1, High current 25 °C - 1400 - uA IDD_MED_M1 Mode 1, Medium current 25 °C - 700 - uA IDD_LOW_M1 Mode 1, Low current 25 °C - 200 - uA IDD_HI_M2 Mode 2, High current 25 °C - 120 - uA IDD_MED_M2 Mode 2, Medium current 25 °C - 60 - uA IDD_LOW_M2 Mode 2, Low current 25 °C - 15 - uA VOS_HI_M1 Mode 1, High current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV VOS_MED_M1 Mode 1, Medium current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV VOS_LOW_M1 Mode 1, Low current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV VOS_HI_M2 Mode 2, High current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV VOS_MED_M2 Mode 2, Medium current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV VOS_LOW_M2 Mode 2, Low current With trim 25 °C, 0.2 V to VDDA- 1.5 V 5 - mV IOUT_HI_M1 Mode 1, High current Output is 0.5 V to VDDA-0.5 V - 10 - mV IOUT_MED_M1 Mode 1, Medium current Output is 0.5 V to VDDA-0.5 V - 10 - mV IOUT_LOW_M1 Mode 1, Low current Output is 0.5 V to VDDA-0.5 V - 4 - mV IOUT_HI_M2 Mode 2, High current Output is 0.5 V to VDDA-0.5 V - 1 - mV IOUT_MED_M2 Mode 2, Medium current Output is 0.5 V to VDDA-0.5 V - 1 - mV IOUT_LOW_M2 Mode 2, Low current Output is 0.5 V to VDDA-0.5 V - 0.5 - mV AC Specifications Parameter Description Conditions Min Typ Max Units GBW Load = 20 pF, 0.1 mA. VDDA = 2.7 V – – – – GBW_HI Power = high 6 – – MHz Document Number: 002-10780 Rev. *A Page 11 of 14 PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) Parameter Description Conditions Min Typ Max Units GBW_MED Power = medium 4 – – MHz GBW_LO Power = low 2 – – MHz GBW_LO Power = low – 1 – MHz – – – – For PSoC 4200 BLE family, PSoC 4100M/PSoC 4200M/ PSoC 4200L Noise VN1 Input referred, 1 Hz - 1GHz, power = high – 94 – µVrms VN2 Input referred, 1 kHz, power = high – 72 – nV/rtHz VN3 Input referred, 10kHz, power = high – 28 – nV/rtHz VN4 Input referred, 100kHz, power = high – 15 – nV/rtHz Slew_rate Cload = 50 pF, Power = High, VDDA ≥ 2.7 V 6 – – V/µsec T_op_wake From disable to enable, no external RC dominating – 300 – µSec T_op_wake From disable to enable, no external RC dominating – 25 – µSec – 50 – kHz PSoC 4100M/PSoC 4200M/ PSoC 4200L Deep-Sleep Mode (For PSoC 4200 BLE family; only guaranteed for VDDA > 2.5 V) GBW_DS Gain bandwidth product Deep-Sleep Mode (For PSoC 4100M/PSoC 4200M/ PSoC 4200L; only guaranteed for VDDA ≥ 2.7 V) Mode 2 is lowest current range. Mode 1 has higher GBW. GBW_HI_M1 Mode 1, High current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 4 - MHz GBW_MED_M1 Mode 1, Medium current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 2 - MHz GBW_LOW_M1 Mode 1, Low current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 0.5 - MHz GBW_HI_M2 Mode 2, High current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 0.5 - MHz GBW_MED_M2 Mode 2, Medium current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 0.2 - MHz GBW_LOW_M2 Mode 2, Low current 20-pF load, no DC load 0.2 V to VDDA-1.5 V - 0.1 - MHz Page 12 of 14 Document Number: 002-10780 Rev. *A PSoC® Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) Component Changes This section lists the major changes in the component from the previous version. Version 1.20.a Description of Changes Reason for Changes / Impact Edited datasheet. Final characterization data for PSoC 4000S, PSoC 4100S and PSoC Analog Coprocessor devices is not available at this time. Once the data is available, the component datasheet will be updated on the Cypress web site. Added support for PSoC Analog Coprocessor devices. New device support. 1.20 Edited the datasheet. 1.10.d Edited the datasheet. Updated Component Parameters section with clarification of the deep sleep operation. Minor corrections in parameters naming (AC Specifications section). Updated DC and AC Electrical Characteristics section with PSoC 4200L data. Updated Offset voltage and Offset voltage drift parameter names into DC Specifications table. 1.10.c Edited the datasheet. 1.10.b Edited the datasheet. Added CMRR parameter values for PSoC 4200 BLE devices. 1.10.a Edited the datasheet. Added information that for correct operation in deep sleep mode, VDDA must be larger than 2.5 V. Updated DC and AC Electrical Characteristics section with PSoC 4100M/ PSoC 4200M data. Added the Deep sleep operation parameter to control component availability in Deep Sleep mode. Updates to support PSoC 4200 BLE devices. Updated API Memory usage and MISRA compliance sections. 1.10 Removed references to SaveConfig() and RestoreConfig() APIs because they are empty. Changed output mode parameters from “1mA” and “10mA” to “Internal only” and “Output to pin” respectively. 1.0.a Updated datasheet. 1.0 First release Document Number: 002-10780 Rev. *A Corrected specs to match device datasheet. Page 13 of 14 PSoC 4 Operational Amplifier (Opamp) PSoC® Creator™ Component Datasheet © Cypress Semiconductor Corporation, 2016. This document is the property of Cypress Semiconductor Corporation and its subsidiaries, including Spansion LLC (“Cypress”). This document, including any software or firmware included or referenced in this document (“Software”), is owned by Cypress under the intellectual property laws and treaties of the United States and other countries worldwide. Cypress reserves all rights under such laws and treaties and does not, except as specifically stated in this paragraph, grant any license under its patents, copyrights, trademarks, or other intellectual property rights. If the Software is not accompanied by a license agreement and you do not otherwise have a written agreement with Cypress governing the use of the Software, then Cypress hereby grants you a personal, non-exclusive, nontransferable license (without the right to sublicense) (1) under its copyright rights in the Software (a) for Software provided in source code form, to modify and reproduce the Software solely for use with Cypress hardware products, only internally within your organization, and (b) to distribute the Software in binary code form externally to end users (either directly or indirectly through resellers and distributors), solely for use on Cypress hardware product units, and (2) under those claims of Cypress’s patents that are infringed by the Software (as provided by Cypress, unmodified) to make, use, distribute, and import the Software solely for use with Cypress hardware products. Any other use, reproduction, modification, translation, or compilation of the Software is prohibited. TO THE EXTENT PERMITTED BY APPLICABLE LAW, CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS DOCUMENT OR ANY SOFTWARE OR ACCOMPANYING HARDWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. To the extent permitted by applicable law, Cypress reserves the right to make changes to this document without further notice. Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document. Any information provided in this document, including any sample design information or programming code, is provided only for reference purposes. It is the responsibility of the user of this document to properly design, program, and test the functionality and safety of any application made of this information and any resulting product. Cypress products are not designed, intended, or authorized for use as critical components in systems designed or intended for the operation of weapons, weapons systems, nuclear installations, life-support devices or systems, other medical devices or systems (including resuscitation equipment and surgical implants), pollution control or hazardous substances management, or other uses where the failure of the device or system could cause personal injury, death, or property damage (“Unintended Uses”). A critical component is any component of a device or system whose failure to perform can be reasonably expected to cause the failure of the device or system, or to affect its safety or effectiveness. Cypress is not liable, in whole or in part, and you shall and hereby do release Cypress from any claim, damage, or other liability arising from or related to all Unintended Uses of Cypress products. You shall indemnify and hold Cypress harmless from and against all claims, costs, damages, and other liabilities, including claims for personal injury or death, arising from or related to any Unintended Uses of Cypress products. Cypress, the Cypress logo, Spansion, the Spansion logo, and combinations thereof, PSoC, CapSense, EZ-USB, F-RAM, and Traveo are trademarks or registered trademarks of Cypress in the United States and other countries. For a more complete list of Cypress trademarks, visit cypress.com. Other names and brands may be claimed as property of their respective owners. Page 14 of 14 Document Number: 002-10780 Rev. *A