2.17 PGA Driver

2.17.1 Introduction

Overview

The Programmable Gain Amplifier (PGA) is an op amp-based, non-inverting amplifier with user programmable gains. The output of the PGA can be connected to a number of dedicated Sample-and-Hold inputs of the Analog-to-Digital Converter (ADC) and/or to the high-speed analog comparator module.

The PGA has multiple selectable gains and may be used as a ground referenced amplifier (single-ended) or as an amplifier with an independent ground reference.

Features

  • Single-Ended or Independent Ground Reference.
  • Selectable Gains: 4x, 8x, 16x and 32x (and 6x,12x, 24x and 48x with the 1.5 gain).
  • High gain bandwidth.
  • Rail-to-rail output voltage.
  • Wide input voltage range

2.17.2 Module Documentation

2.17.2.1 PGA Driver

The PGA is an op amp-based, noninverting amplifier with user-programmable gains. The output of the PGA can be connected to a number of dedicated Sample-and-Hold inputs of the Analog-to-Digital Converter and/or to the high-speed analog comparator module.

2.17.2.1.1 Module description

The PGA is an op amp-based, noninverting amplifier with user-programmable gains. The output of the PGA can be connected to a number of dedicated Sample-and-Hold inputs of the Analog-to-Digital Converter and/or to the high-speed analog comparator module.

2.17.2.1.1.1 Data structures
  • struct PGA_INTERFACE

    Structure containing the function pointers of PGA driver.

2.17.2.1.1.4 Variables

2.17.2.1.2 Function Documentation

2.17.2.1.2.1 PGA1_Deinitialize()

void PGA1_Deinitialize (void )

Deinitializes the PGA1 to POR values.

Parameters:
none
Returns:

none  

2.17.2.1.2.2 PGA1_Disable()

inline static void PGA1_Disable (void )

This inline function disables the PGA1 module.

Parameters:
none
Returns:

none  

2.17.2.1.2.3 PGA1_Enable()

inline static void PGA1_Enable (void )

This inline function enables the PGA1 module.

Precondition:

The PGA1_Initialize function should be called before calling this function.

Parameters:
none
Returns:

none  

2.17.2.1.2.4 PGA1_GainSet()

inline static void PGA1_GainSet (enum PGA_GAIN gainValue)

Sets gain for PGA.

Parameters:
in gainValue

- mask value of the gain.

Returns:

none  

2.17.2.1.2.5 PGA1_Initialize()

void PGA1_Initialize (void )

Initializes the PGA1 module.

Parameters:
none
Returns:

none  

2.17.2.1.3 Enumeration Type Documentation

2.17.2.1.3.1 PGA_GAIN

enum PGA_GAIN

This defines the gain enumeration for PGA.

PGA_GAIN_32x

PGA_GAIN_32x Assigned to mask value 5

PGA_GAIN_16x

PGA_GAIN_16x Assigned to mask value 4

PGA_GAIN_8x

PGA_GAIN_8x Assigned to mask value 3

PGA_GAIN_4x

PGA_GAIN_4x Assigned to mask value 2

2.17.2.1.4 Variable Documentation

2.17.2.1.4.1 PGA1

const struct PGA_INTERFACE PGA1

Structure object of type PGA_INTERFACE with the custom name given by the user in the Melody Driver User interface.

The default name e.g. PGA1 can be changed by the user in the PGA user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability.

2.17.3 Class Documentation

2.17.3.1 PGA_INTERFACE Struct Reference

Structure containing the function pointers of PGA driver.

2.17.3.1.1 Detailed Description

Structure containing the function pointers of PGA driver.

#include <pga_interface.h>

2.17.3.1.2 Member Data Documentation

The documentation for this struct was generated from the following file:

source/

pga_interface.h

2.17.3.1.2.1 Deintitialize

void(* Deintitialize) (void)

Pointer to PGAx_Deinitialize e.g. PGA1_Deinitialize.

2.17.3.1.2.2 Disable

void(* Disable) (void)

Pointer to PGAx_Disable e.g. PGA1_Disable.

2.17.3.1.2.3 Enable

void(* Enable) (void)

Pointer to PGAx_Enable e.g. PGA1_Enable.

2.17.3.1.2.4 GainSet

void(* GainSet) (enum PGA_GAIN gainValue)

Pointer to PGAx_GainSet e.g. PGA1_GainSet.

2.17.3.1.2.5 Intitialize

void(* Intitialize) (void)

Pointer to PGAx_Initialize e.g. PGA1_Initialize.

2.17.4 File Documentation

2.17.4.1 source/pga1.h File Reference

#include <xc.h>
#include <stdint.h>
#include "pga_types.h"
#include "pga_interface.h"

2.17.4.1.2 Variables

2.17.4.2 source/pga_interface.h File Reference

#include "pga_types.h"

2.17.4.2.1 Data structures

  • struct PGA_INTERFACE

    Structure containing the function pointers of PGA driver.

2.17.4.2.2 Detailed Description

PGA Generated Driver Interface Header File

2.17.4.3 source/pga_types.h File Reference

This is the generated driver types header file for the PGA driver.

2.17.4.3.2 Detailed Description

This is the generated driver types header file for the PGA driver.

PGA Generated Driver Types Header File