2.3 CBG Driver

Overview

The Current Bias Generator (CBG) consists of two classes of current sources: 10 µA and 50 µA sources.

  • 10 µA Current Sources
    • Current sourcing only.
    • Up to four independent sources.
  • 50 µA Current Sources
    • Selectable current sourcing or sinking.
    • Selectable current mirroring for sourcing and sinking.

Features

  • Simultaneous generation of 10uA and 50uA current source or sink on dedicated output pins.
  • Enabling 10uA current sources and 50uA current source or sink enables the corresponding output pin as well.
  • Current mirror mode is supported only in 50uA source.

2.3.1 Module Documentation

2.3.1.1 CBG Driver

Current Bias Generator driver is to configure 10uA and 50uA current sources using dsPIC MCUs.

2.3.1.1.1 Module description

Current Bias Generator driver is to configure 10uA and 50uA current sources using dsPIC MCUs.

Data structures
  • struct CBG_INTERFACE

    Structure containing the function pointers of CBG driver.

Functions
  • void CBG_Initialize (void)

    Initializes CBG module.

  • void CBG_Deinitialize (void)

    Deinitializes the CBG to POR values.

  • static void CBG_Enable (void)

    This inline function enables the CBG module.

  • static void CBG_Disable (void)

    This inline function disables the CBG module.

Variables
  • const struct CBG_INTERFACE CBG

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

2.3.1.1.2 Function Documentation

CBG_Deinitialize()

void CBG_Deinitialize (void )

Deinitializes the CBG to POR values.

Parameters:
none
Returns:

none

CBG_Disable()

inline static void CBG_Disable (void )

This inline function disables the CBG module.

Precondition:

The CBG_Initialize function should be called before calling this function.

Parameters:
none
Returns:

none

CBG_Enable()

inline static void CBG_Enable (void )

This inline function enables the CBG module.

Precondition:

The CBG_Initialize function should be called before calling this function.

Returns:

none

CBG_Initialize()

void CBG_Initialize (void )

Initializes CBG module.

Parameters:
none
Returns:

none

2.3.1.1.3 Variable Documentation

CBG

const struct CBG_INTERFACE CBG

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

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

2.3.2 Class Documentation

2.3.2.1 CBG_INTERFACE Struct Reference

Structure containing the function pointers of CBG driver.

2.3.2.1.2 Member Data Documentation

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

source/

cbg_interface.h

Disable

void(* Disable) (void)

Pointer to CBG_Disable.

Enable

void(* Enable) (void)

Pointer to CBG_Enable.

2.3.3 File Documentation

2.3.3.1 source/cbg.h File Reference

This is the generated driver header file for the CBG driver.

#include <xc.h>
#include "cbg_interface.h"

2.3.3.1.1 Functions

  • void CBG_Initialize (void)

    Initializes CBG module.

  • void CBG_Deinitialize (void)

    Deinitializes the CBG to POR values.

  • static void CBG_Enable (void)

    This inline function enables the CBG module.

  • static void CBG_Disable (void)

    This inline function disables the CBG module.

2.3.3.1.2 Variables

  • const struct CBG_INTERFACE CBG

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

2.3.3.1.3 Detailed Description

This is the generated driver header file for the CBG driver.

CBG Generated Driver Header File

2.3.3.2 source/cbg_interface.h File Reference

2.3.3.2.1 Data structures

  • struct CBG_INTERFACE

    Structure containing the function pointers of CBG driver.

2.3.3.2.2 Detailed Description

CBG Generated Driver Interface Header File