3.19.3 5.5 MHz Gain Bandwidth OPAMP
5.5 MHz Gain Bandwidth Operational Amplifier
3.19.3.1 Introduction
The Operational Amplifier (OPA) module features a standard general purpose three-terminal device with programmable gain options, adjustable input offset voltage and hardware override control capabilities. This variant of the module features a 5.5 MHz Gain Bandwidth.
3.19.3.2 Supported Device Families
PIC16F171xx | PIC18F-Q41 |
3.19.3.3 Required header files
#include "mcc_generated_files/opa/opa[X].h"
3.19.3.4 Module Documentation
3.19.3.4.1 OPA1
This file contains the API prototypes and the related data structures for the OPA1 driver.
Module description
This file contains the API prototypes and the related data structures for the OPA1 driver.
Enumerations
enum OPA1_resistor_select { OPA1_R2byR1_is_0dp07, OPA1_R2byR1_is_0dp14, OPA1_R2byR1_is_0dp33, OPA1_R2byR1_is_1, OPA1_R2byR1_is_1dp67, OPA1_R2byR1_is_3, OPA1_R2byR1_is_7, OPA1_R2byR1_is_15 }
Enumeration of the R2/R1 resistor ratio values.
enum OPA1_posChannel_select { OPA1_posChannel_Vss, OPA1_posChannel_GSEL, OPA1_posChannel_OPA1IN, OPA1_posChannel_Vdd_by_2, OPA1_posChannel_DAC1, OPA1_posChannel_DAC2 }
Enumeration of the available positive channels.
enum OPA1_posSource_select { OPA1_RB5_IN0_pos = 0x0, OPA1_RC3_IN1_pos = 0x1, OPA1_RA2_IN2_pos = 0x2, OPA1_RA0_IN3_pos = 0x3 }
Enumeration of the available positive sources.
enum OPA1_negChannel_select { OPA1_negChannel_No_Connection = 0x0, OPA1_negChannel_GSEL = 0x1, OPA1_negChannel_OPA1IN = 0x2, OPA1_negChannel_DAC1 = 0x4, OPA1_negChannel_DAC2 = 0x5 }
Enumeration of the available negative channels.
enum OPA1_negSource_select { OPA1_RB4_IN0_neg = 0x0, OPA1_RC3_IN1_neg = 0x1, OPA1_RA2_IN2_neg = 0x2, OPA1_RA0_IN3_neg = 0x3, OPA1_Vss = 0x7 }
Enumeration of the available negative sources.
Functions
void OPAx_Initialize (void)
Initializes the OPA1 module. This is called only once before calling other OPA1 APIs.
void OPAx_EnableChargePump (void)
Enables the OPA1 charge pump.
void OPAx_DisableChargePump (void)
Disables the OPA1 charge pump.
void OPAx_EnableSoftwareUnityGain (void)
Enables the OPA1 to operate with unity gain.
void OPAx_DisableSoftwareUnityGain (void)
Disables unity gain for OPA1. The inverting input is connected to the designated OPAxIN- pin.
void OPAx_SetPositiveChannel (OPA1_posChannel_select posChannel)
Sets the positive channel.
void OPAx_SetPositiveSource (OPA1_posSource_select posSource)
Sets the positive source.
void OPAx_SetNegativeChannel (OPA1_negChannel_select negChannel)
Sets the negative channel.
void OPAx_SetNegativeSource (OPA1_negSource_select negSource)
Sets the negative source.
void OPAx_SetResistorLadder (OPA1_resistor_select resistorSelection)
Sets the R1 and R2 values of internal resistor ladder.
void OPAx_EnableHardwareOverride (void)
Enables hardware override control.
void OPAx_SetHardwareOverrideSource (uint8_t overrideSource, uint8_t polarity)
Selects the hardware override source and polarity.
void OPAx_DisableHardwareOverride (void)
Disables the hardware override control.
void OPAx_SetSoftwareOverride (uint8_t softwareControl)
Selects the software override mode.
void OPAx_SetInputOffset (uint8_t offset)
Sets the input offset calibration value of OPA1.
Function Documentation
OPAx_DisableChargePump()
void OPAx_DisableChargePump (void )[inline]
Disables the OPA1 charge pump.
OPAx_Initialize() is already called. |
|
None. |
OPAx_DisableHardwareOverride()
void OPAx_DisableHardwareOverride (void )[inline]
Disables the hardware override control.
OPAx_Initialize() is already called. |
|
None. |
OPAx_DisableSoftwareUnityGain()
void OPAx_DisableSoftwareUnityGain (void )[inline]
Disables unity gain for OPA1. The inverting input is connected to the designated OPAxIN- pin.
OPAx_Initialize() is already called. |
|
None. |
OPAx_EnableChargePump()
void OPAx_EnableChargePump (void )[inline]
Enables the OPA1 charge pump.
OPAx_Initialize() is already called. |
|
None. |
OPAx_EnableHardwareOverride()
void OPAx_EnableHardwareOverride (void )[inline]
Enables hardware override control.
OPAx_Initialize() is already called. |
|
None. |
OPAx_EnableSoftwareUnityGain()
void OPAx_EnableSoftwareUnityGain (void )[inline]
Enables the OPA1 to operate with unity gain.
OPAx_Initialize() is already called. |
|
None. |
OPAx_Initialize()
void OPAx_Initialize (void )
Initializes the OPA1 module. This is called only once before calling other OPA1 APIs.
|
None. |
Section: Included FilesSection: OPA1 Module APIs
OPAx_SetHardwareOverrideSource()
void OPAx_SetHardwareOverrideSource (uint8_t overrideSource, uint8_t polarity)
Selects the hardware override source and polarity.
The OPA1_EnableHardwareOverride() is already called. |
|
None. |
OPAx_SetInputOffset()
void OPAx_SetInputOffset (uint8_t offset)[inline]
Sets the input offset calibration value of OPA1.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetNegativeChannel()
void OPAx_SetNegativeChannel (OPA1_negChannel_select negChannel)[inline]
Sets the negative channel.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetNegativeSource()
void OPAx_SetNegativeSource (OPA1_negSource_select negSource)[inline]
Sets the negative source.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetPositiveChannel()
void OPAx_SetPositiveChannel (OPA1_posChannel_select posChannel)[inline]
Sets the positive channel.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetPositiveSource()
void OPAx_SetPositiveSource (OPA1_posSource_select posSource)[inline]
Sets the positive source.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetResistorLadder()
void OPAx_SetResistorLadder (OPA1_resistor_select resistorSelection)
Sets the R1 and R2 values of internal resistor ladder.
OPAx_Initialize() is already called. |
|
None. |
OPAx_SetSoftwareOverride()
void OPAx_SetSoftwareOverride (uint8_t softwareControl)[inline]
Selects the software override mode.
The OPA1_DisableHardwareOverride() is already called. |
|
None. |
Enumeration Type Documentation
OPA1_negChannel_select
Enumeration of the available negative channels.
OPA1_negChannel_No_Connection | ||
OPA1_negChannel_GSEL | ||
OPA1_negChannel_OPA1IN | ||
OPA1_negChannel_DAC1 | ||
OPA1_negChannel_DAC2 |
OPA1_negSource_select
Enumeration of the available negative sources.
OPA1_RB4_IN0_neg | ||
OPA1_RC3_IN1_neg | ||
OPA1_RA2_IN2_neg | ||
OPA1_RA0_IN3_neg | ||
OPA1_Vss |
OPA1_posChannel_select
Enumeration of the available positive channels.
OPA1_posChannel_Vss | ||
OPA1_posChannel_GSEL | ||
OPA1_posChannel_OPA1IN | ||
OPA1_posChannel_Vdd_by_2 | ||
OPA1_posChannel_DAC1 | ||
OPA1_posChannel_DAC2 |
OPA1_posSource_select
Enumeration of the available positive sources.
OPA1_RB5_IN0_pos | ||
OPA1_RC3_IN1_pos | ||
OPA1_RA2_IN2_pos | ||
OPA1_RA0_IN3_pos |
OPA1_resistor_select
enum OPA1_resistor_select
Enumeration of the R2/R1 resistor ratio values.
Section: Included Files
OPA1_R2byR1_is_0dp07 |
R2/R1 = 0.07 | |
OPA1_R2byR1_is_0dp14 |
R2/R1 = 0.14 | |
OPA1_R2byR1_is_0dp33 |
R2/R1 = 0.33 | |
OPA1_R2byR1_is_1 |
R2/R1 = 1 | |
OPA1_R2byR1_is_1dp67 |
R2/R1 = 1.67 | |
OPA1_R2byR1_is_3 |
R2/R1 = 3 | |
OPA1_R2byR1_is_7 |
R2/R1 = 7 | |
OPA1_R2byR1_is_15 |
R2/R1 = 15 |
3.19.3.5 File Documentation
3.19.3.5.1 source/opa1.c File Reference
This file contains the API implementations for the OPA1 driver.
#include <xc.h> #include "../opa1.h"
Functions
void OPAx_Initialize (void)
Initializes the OPA1 module. This is called only once before calling other OPA1 APIs.
void OPAx_EnableChargePump (void)
Enables the OPA1 charge pump.
void OPAx_DisableChargePump (void)
Disables the OPA1 charge pump.
void OPAx_EnableSoftwareUnityGain (void)
Enables the OPA1 to operate with unity gain.
void OPAx_DisableSoftwareUnityGain (void)
Disables unity gain for OPA1. The inverting input is connected to the designated OPAxIN- pin.
void OPAx_SetPositiveChannel (OPA1_posChannel_select posChannel)
Sets the positive channel.
void OPAx_SetPositiveSource (OPA1_posSource_select posSource)
Sets the positive source.
void OPAx_SetNegativeChannel (OPA1_negChannel_select negChannel)
Sets the negative channel.
void OPAx_SetNegativeSource (OPA1_negSource_select negSource)
Sets the negative source.
void OPAx_SetResistorLadder (OPA1_resistor_select resistorSelection)
Sets the R1 and R2 values of internal resistor ladder.
void OPAx_EnableHardwareOverride (void)
Enables hardware override control.
void OPAx_SetHardwareOverrideSource (uint8_t overrideSource, uint8_t polarity)
Selects the hardware override source and polarity.
void OPAx_DisableHardwareOverride (void)
Disables the hardware override control.
void OPAx_SetSoftwareOverride (uint8_t softwareControl)
Selects the software override mode.
void OPAx_SetInputOffset (uint8_t offset)
Sets the input offset calibration value of OPA1.
Detailed Description
This file contains the API implementations for the OPA1 driver.
OPA1 Generated Driver File.
3.19.3.5.2 source/opa1.h File Reference
#include <stdint.h> #include <stdbool.h>
Functions
void OPAx_Initialize (void)
Initializes the OPA1 module. This is called only once before calling other OPA1 APIs.
void OPAx_EnableChargePump (void)
Enables the OPA1 charge pump.
void OPAx_DisableChargePump (void)
Disables the OPA1 charge pump.
void OPAx_EnableSoftwareUnityGain (void)
Enables the OPA1 to operate with unity gain.
void OPAx_DisableSoftwareUnityGain (void)
Disables unity gain for OPA1. The inverting input is connected to the designated OPAxIN- pin.
void OPAx_SetPositiveChannel (OPA1_posChannel_select posChannel)
Sets the positive channel.
void OPAx_SetPositiveSource (OPA1_posSource_select posSource)
Sets the positive source.
void OPAx_SetNegativeChannel (OPA1_negChannel_select negChannel)
Sets the negative channel.
void OPAx_SetNegativeSource (OPA1_negSource_select negSource)
Sets the negative source.
void OPAx_SetResistorLadder (OPA1_resistor_select resistorSelection)
Sets the R1 and R2 values of internal resistor ladder.
void OPAx_EnableHardwareOverride (void)
Enables hardware override control.
void OPAx_SetHardwareOverrideSource (uint8_t overrideSource, uint8_t polarity)
Selects the hardware override source and polarity.
void OPAx_DisableHardwareOverride (void)
Disables the hardware override control.
void OPAx_SetSoftwareOverride (uint8_t softwareControl)
Selects the software override mode.
void OPAx_SetInputOffset (uint8_t offset)
Sets the input offset calibration value of OPA1.
Enumerations
enum OPA1_resistor_select { OPA1_R2byR1_is_0dp07, OPA1_R2byR1_is_0dp14, OPA1_R2byR1_is_0dp33, OPA1_R2byR1_is_1, OPA1_R2byR1_is_1dp67, OPA1_R2byR1_is_3, OPA1_R2byR1_is_7, OPA1_R2byR1_is_15 }
Enumeration of the R2/R1 resistor ratio values.
enum OPA1_posChannel_select { OPA1_posChannel_Vss, OPA1_posChannel_GSEL, OPA1_posChannel_OPA1IN, OPA1_posChannel_Vdd_by_2, OPA1_posChannel_DAC1, OPA1_posChannel_DAC2 }
Enumeration of the available positive channels.
enum OPA1_posSource_select { OPA1_RB5_IN0_pos = 0x0, OPA1_RC3_IN1_pos = 0x1, OPA1_RA2_IN2_pos = 0x2, OPA1_RA0_IN3_pos = 0x3 }
Enumeration of the available positive sources.
enum OPA1_negChannel_select { OPA1_negChannel_No_Connection = 0x0, OPA1_negChannel_GSEL = 0x1, OPA1_negChannel_OPA1IN = 0x2, OPA1_negChannel_DAC1 = 0x4, OPA1_negChannel_DAC2 = 0x5 }
Enumeration of the available negative channels.
enum OPA1_negSource_select { OPA1_RB4_IN0_neg = 0x0, OPA1_RC3_IN1_neg = 0x1, OPA1_RA2_IN2_neg = 0x2, OPA1_RA0_IN3_neg = 0x3, OPA1_Vss = 0x7 }
Enumeration of the available negative sources.
Detailed Description
OPA1 Generated Driver API Header File.