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

PIC16F171xxPIC18F-Q41

3.19.3.3 Required header files

#include "mcc_generated_files/opa/opa[X].h"
Note: Replace [X] with the selected instance number of the OPA module.

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.

Version: OPA1 Driver Version 2.1.0
Enumerations
Functions

Function Documentation

OPAx_DisableChargePump()

void OPAx_DisableChargePump (void )[inline]

Disables the OPA1 charge pump.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_DisableHardwareOverride()

void OPAx_DisableHardwareOverride (void )[inline]

Disables the hardware override control.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_DisableSoftwareUnityGain()

void OPAx_DisableSoftwareUnityGain (void )[inline]

Disables unity gain for OPA1. The inverting input is connected to the designated OPAxIN- pin.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_EnableChargePump()

void OPAx_EnableChargePump (void )[inline]

Enables the OPA1 charge pump.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_EnableHardwareOverride()

void OPAx_EnableHardwareOverride (void )[inline]

Enables hardware override control.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_EnableSoftwareUnityGain()

void OPAx_EnableSoftwareUnityGain (void )[inline]

Enables the OPA1 to operate with unity gain.

Precondition:

OPAx_Initialize() is already called.

Parameters:
None.
Returns:

None.

OPAx_Initialize()

void OPAx_Initialize (void )

Initializes the OPA1 module. This is called only once before calling other OPA1 APIs.

Parameters:
None.
Returns:

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.

Precondition:

The OPA1_EnableHardwareOverride() is already called.

Parameters:
overrideSource

- Selected output override source for OPA1.

polarity

- Selected hardware control input polarity for OPA1.

Returns:

None.

OPAx_SetInputOffset()

void OPAx_SetInputOffset (uint8_t offset)[inline]

Sets the input offset calibration value of OPA1.

Precondition:

OPAx_Initialize() is already called.

Parameters:
offset

- Input offset calibration value.

Returns:

None.

OPAx_SetNegativeChannel()

void OPAx_SetNegativeChannel (OPA1_negChannel_select negChannel)[inline]

Sets the negative channel.

Precondition:

OPAx_Initialize() is already called.

Parameters:
Selected

negative channel for OPA1. Refer to the OPA1_negChannel_select for a complete list of possible values.

Returns:

None.

OPAx_SetNegativeSource()

void OPAx_SetNegativeSource (OPA1_negSource_select negSource)[inline]

Sets the negative source.

Precondition:

OPAx_Initialize() is already called.

Parameters:
Selected

negative source for OPA1. Refer to the OPA1_negSource_select for a complete list of possible values.

Returns:

None.

OPAx_SetPositiveChannel()

void OPAx_SetPositiveChannel (OPA1_posChannel_select posChannel)[inline]

Sets the positive channel.

Precondition:

OPAx_Initialize() is already called.

Parameters:
posChannel

- Selected positive channel for OPA1. Refer to the OPA1_posChannel_select for a complete list of possible values.

Returns:

None.

OPAx_SetPositiveSource()

void OPAx_SetPositiveSource (OPA1_posSource_select posSource)[inline]

Sets the positive source.

Precondition:

OPAx_Initialize() is already called.

Parameters:
posSource

- Selected positive source for OPA1. Refer to OPA1_posSource_select for a complete list of possible values.

Returns:

None.

OPAx_SetResistorLadder()

void OPAx_SetResistorLadder (OPA1_resistor_select resistorSelection)

Sets the R1 and R2 values of internal resistor ladder.

Precondition:

OPAx_Initialize() is already called.

Parameters:
resistorSelection

- Selected R2/R1 resistor ratio for OPA1. Refer to the OPA1_resistor_select for a complete list of possible values.

Returns:

None.

OPAx_SetSoftwareOverride()

void OPAx_SetSoftwareOverride (uint8_t softwareControl)[inline]

Selects the software override mode.

Precondition:

The OPA1_DisableHardwareOverride() is already called.

Parameters:
softwareControl

- Two-bit value representing the selected Software Control mode.

Returns:

None.

Enumeration Type Documentation

OPA1_negChannel_select

enum 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

enum 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

enum 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

enum 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

Detailed Description

This file contains the API implementations for the OPA1 driver.

OPA1 Generated Driver File.

Version: OPA1 Driver Version 2.1.0

3.19.3.5.2 source/opa1.h File Reference

#include <stdint.h>
#include <stdbool.h>

Functions

Enumerations

Detailed Description

OPA1 Generated Driver API Header File.