3.13 FVR - Fixed Voltage Reference

3.13.1 Introduction

The MPLAB® Code Configurator (MCC) Melody Melody Fixed Voltage Reference Peripheral Library (PLIBs) drivers generates APIs to support FVR-specific peripheral functionality on target MCUs.

The Fixed Voltage Reference (FVR) is a stable voltage reference, independent of VDD, with 1.024V, 2.048V or 4.096V selectable output levels. The FVR output can be configured to supply a reference voltage to analog peripherals such as the Analog-to-Digital Converter (ADC), the Comparator (CMP), and the Digital-to-Analog Converter (DAC).

3.13.2 Supported Device Families

PIC12/16F150xPIC12/16F157xPIC12/16F161x
PIC12/16F184xPIC12/16LF155xPIC16F145x
PIC16F151xPIC16F152xPIC16F152xx
PIC16F153xxPIC16F170xPIC16F171x
PIC16F171xxPIC16F176xPIC16F177x
PIC16F178xPIC16F180xxPIC16F181xx
PIC16F183xxPIC16F184xxPIC16F188xx
PIC16F191xxPIC16F194xPIC16LF156x
PIC16LF190xPIC18F-K20PIC18F-K40
PIC18F-K42PIC18F-K50PIC18F-K83
PIC18F-Q10PIC18F-Q20PIC18F-Q24
PIC18F-Q40PIC18F-Q41PIC18F-Q43
PIC18F-Q71PIC18F-Q83PIC18F-Q84

3.13.3 Required Header Files:

#include "mcc_generated_files/fvr/fvr.h"

3.13.4 Module Documentation

3.13.4.1 FVR

This file contains the API prototypes for the FVR module.

3.13.4.1.1 Module description

This file contains the API prototypes for the FVR module.

Version: FVR Driver Version 2.0.1
Functions
  • void FVR_Initialize (void)

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

  • bool FVR_IsOutputReady (void)

    Checks if the FVR output is ready.

3.13.4.1.2 Function Documentation

FVR_Initialize()

void FVR_Initialize (void )

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

Parameters:
None.
Returns:

None.

FVR_IsOutputReady()

bool FVR_IsOutputReady (void )

Checks if the FVR output is ready.

Precondition:

Initialize the FVR before calling this function.

Parameters:
None.
Return values:
True

- FVR module is ready for use.

False

- FVR module is not ready for use.

3.13.5 File Documentation

3.13.5.1 source/fvr.c File Reference

This file contains the API implementation for the FVR module.

#include <xc.h>
#include "../fvr.h"

3.13.5.1.1 Functions

  • void FVR_Initialize (void)

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

  • bool FVR_IsOutputReady (void)

    Checks if the FVR output is ready.

3.13.5.1.2 Detailed Description

This file contains the API implementation for the FVR module.

FVR Generated Driver File.

Version: FVR Driver Version 2.0.1

3.13.5.2 source/fvr.h File Reference

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

3.13.5.2.1 Functions

  • void FVR_Initialize (void)

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

  • bool FVR_IsOutputReady (void)

    Checks if the FVR output is ready.

3.13.5.2.2 Detailed Description

FVR Generated Driver API Header File.