® PSoC Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) 1.10 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 to a 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 PSoC 4200 BLE devices the Comparator can operate in the 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: 001-92541 Rev. *C • 198 Champion Court • San Jose, CA 95134-1709 • 408-943-2600 Revised May 8, 2015 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 13 Document Number: 001-92541 Rev. *C ® 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 available for PSoC 4200 BLE devices only. It enables the component operation in Deep Sleep mode. If this option is enabled, a “DSOp” label will be displayed under the symbol. 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: 001-92541 Rev. *C Page 3 of 13 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 is 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 13 Document Number: 001-92541 Rev. *C ® 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: 001-92541 Rev. *C Page 5 of 13 ® PSoC 4 Operational Amplifier (Opamp) PSoC Creator™ Component Datasheet 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. Call the Sleep() function before calling the CySysPmDeepSleep() or the CySysPmHibernate() functions. The "Deep sleep operation" option has an influence on this function implementation. 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. The "Deep sleep operation" option has an influence on this function implementation. Parameters: None Return Value: None Side Effects: Calling the Wakeup() function without first calling the Sleep() function may produce unexpected behavior. Page 6 of 13 Document Number: 001-92541 Rev. *C ® 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 to a function-like macro. Deviated since function-like macros 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 Deep sleep operation Flash Bytes SRAM Bytes Disabled 240 9 Enabled 188 8 Document Number: 001-92541 Rev. *C Page 7 of 13 ® PSoC 4 Operational Amplifier (Opamp) PSoC Creator™ Component Datasheet 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 of 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. Block Diagram and Configuration The component uses cy_psoc4_abuf primitive. 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. Page 8 of 13 Document Number: 001-92541 Rev. *C ® PSoC Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) 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. 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. 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 – 1100 1850 µA Document Number: 001-92541 Rev. *C Page 9 of 13 ® PSoC 4 Operational Amplifier (Opamp) Parameter Description PSoC Creator™ Component Datasheet Conditions Min Typ Max Units IDD_MED Power = medium For PSoC 4100M/ PSoC 4200M – 550 950 µA IDD_LOW Power = low For PSoC 4100M/ PSoC 4200M – 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 – – – – IOUT_MAX_HI Power = high 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 – 0.2 V VCM Charge pump on, VDDA ≥ 2.7 V –0.05 – VDDA – 0.2 V VOUT VDDA ≥ 2.7 V – – – VOUT_1 Power = high, ILOAD=10 mA 0.5 – VDDA – 0.5 V VOUT_2 Power = high, ILOAD=1 mA 0.2 – VDDA – 0.2 V VOUT_3 Power = medium, ILOAD=1 mA 0.2 – VDDA – 0.2 V VOUT_4 Power = low, ILOAD=0.1mA 0.2 – VDDA – 0.2 V 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 CMRR DC VDDD = 3.6 V 70 80 – dB CMRR DC For PSoC 4200 BLE family 65 70 – dB 60 70 – dB 70 85 – dB VDDD = 3.6 V, HighPower Mode CMRR PSRR Page 10 of 13 DC Common mode rejection ratio. High Power mode. Common Model Voltage Range from 0.5V to VDDA 0.5V. At 1 kHz, 100 mV ripple For PSoC 4100M/ PSoC 4200M VDDD = 3.6 V VDDD = 3.6 V Document Number: 001-92541 Rev. *C ® PSoC Creator™ Component Datasheet PSoC 4 Operational Amplifier (Opamp) 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 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 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 CLOAD Stable up to maximum load. Performance specs at 50 pF. – – 125 pF 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 PSoC 4100M/PSoC 4200M Deep-Sleep Mode (For PSoC 4200 BLE family; only guaranteed for VDDA > 2.5 V) GBW_DS Gain bandwidth product – 50 – kHz IDD_DS Current – 15 – μA Vos_DS Offset voltage – 5 – mV Vos_dr_DS Offset voltage drift – 20 – μV/°C 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; 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 Document Number: 001-92541 Rev. *C Page 11 of 13 ® PSoC 4 Operational Amplifier (Opamp) Parameter PSoC Creator™ Component Datasheet Description Conditions Min Typ Max IDD_MED_M2 Mode 2, Medium current 25 °C - 60 uA IDD_LOW_M2 Mode 2, Low current 25 °C - 15 uA 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 VOS_HI_M1 Mode 1, High current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV VOS_MED_M1 Mode 1, Medium current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV VOS_LOW_M2 Mode 1, Low current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV VOS_HI_M2 Mode 2, High current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV VOS_MED_M2 Mode 2, Medium current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV VOS_LOW_M2 Mode 2, Low current With trim 25 °C, 0.2 V to VDDA1.5 V - 5 mV IOUT_HI_M! 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 IOU_MED_M2 Mode 2, Medium current Output is 0.5 V to VDDA-0.5 V - 1 mV IOU_LOW_M2 Mode 2, Low current Output is 0.5 V to VDDA-0.5 V - 0.5 mV Page 12 of 13 Units Document Number: 001-92541 Rev. *C ® 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 Description of Changes Reason for Changes / Impact 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. Added the Deep sleep operation parameter to control component availability in Deep Sleep mode. Updated API Memory usage and MISRA compliance sections. 1.10 Updated DC and AC Electrical Characteristics section with PSoC 4100M/ PSoC 4200M data. Updates to support PSoC 4200 BLE devices. 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 Corrected specs to match device datasheet. © Cypress Semiconductor Corporation, 2015. 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 lifesupport 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-92541 Rev. *C Page 13 of 13