4.6.1 MVIO
Multi-Voltage I/O
4.6.1.1 Introduction
The Multi-Voltage I/O (MVIO) feature allows a subset of the I/O pins to be powered by a different I/O voltage domain than the rest of the I/O pins. This eliminates the need of having external level shifters for communication or control of external components running on a different voltage level. The MVIO-capable I/O pads are supplied by a voltage applied to the VDDIOx power pin(s), while the regular I/O pins are supplied by the voltage applied to the VDD device power pin(s).
Features
- A subset of the Device I/O pins can be powered by VDDIOx
- The VDDIOx supply can ramp up and down Independently of the VDD supply
- VDDIOx Supply Voltage Monitoring with dedicated System Level Interrupt
- Power on Reset circuitry for VDDIOx power domain with dedicated System Level Interrupt
- Configurable Low-Voltage Detection circuit for VDDIOx power domain with dedicated System Level Interrupt
- Internal Analog-to-Digital Converter (ADC) channel for measuring VDDIOx supply voltage
4.6.1.2 Supported Device Families
PIC18F-Q24 |
4.6.1.3 Required header files:
#include "mcc_generated_files/system/mvio/vddio2.h"
4.6.1.4 Module Documentation
4.6.1.4.1 Mvio
This file contains the API prototypes for the Multi-Voltage Input/Output (MVIO) driver.
Module description
This file contains the API prototypes for the Multi-Voltage Input/Output (MVIO) driver.
Enumerations
enum LVD_TRIP_POINTS { LVD_TRIP_POINT_undefined = 0, LVD_TRIP_POINT_1p70 = 1, LVD_TRIP_POINT_2p20 = 2, LVD_TRIP_POINT_2p40 = 3, LVD_TRIP_POINT_2p45 = 4, LVD_TRIP_POINT_2p65 = 5, LVD_TRIP_POINT_2p70 = 6, LVD_TRIP_POINT_2p85 = 7, LVD_TRIP_POINT_2p90 = 8, LVD_TRIP_POINT_3p15 = 9, LVD_TRIP_POINT_3p20 = 10, LVD_TRIP_POINT_3p70 = 11, LVD_TRIP_POINT_3p93 = 12, LVD_TRIP_POINT_4p40 = 13, LVD_TRIP_POINT_4p76 = 14, LVD_TRIP_POINT_4p80 = 15 }
Contains the Trip Point voltage values for the MVIO driver.
Functions
void VDDIO2_Initialize (void)
Initializes the VDDIO2 module.
void VDDIO2_LVDSet (LVD_TRIP_POINTS trip_point)
Sets the Low Voltage Detection(LVD) Trip Point value.
void VDDIO2_HysteresisEnable (void)
Enables the Hysteresis for Resistor Ladder.
void VDDIO2_HysteresisDisable (void)
Disables the Hysteresis for Resistor Ladder.
bool VDDIO2_IsReady (void)
Checks if VDDIO2 Voltage is within the range.
bool VDDIO2_LVDStatusGet (void)
Checks VDDIO2 Voltage with respect to the selected LVD Voltage.
Function Documentation
VDDIO2_HysteresisDisable()
void VDDIO2_HysteresisDisable (void )[inline]
Disables the Hysteresis for Resistor Ladder.
None. |
None. |
VDDIO2_HysteresisEnable()
void VDDIO2_HysteresisEnable (void )[inline]
Enables the Hysteresis for Resistor Ladder.
None. |
None. |
VDDIO2_Initialize()
void VDDIO2_Initialize (void )
Initializes the VDDIO2 module.
None. |
None. |
Section: Included Files
VDDIO2_IsReady()
bool VDDIO2_IsReady (void )
Checks if VDDIO2 Voltage is within the range.
None. |
True |
- The VDDIO2 supply voltage is within the acceptable range for operation. |
False |
- The VDDIO2 supply voltage is below the acceptable range for operation. |
VDDIO2_LVDSet()
void VDDIO2_LVDSet (LVD_TRIP_POINTS trip_point)
Sets the Low Voltage Detection(LVD) Trip Point value.
trip_point |
- Trip point value |
None. |
VDDIO2_LVDStatusGet()
bool VDDIO2_LVDStatusGet (void )
Checks VDDIO2 Voltage with respect to the selected LVD Voltage.
None. |
True |
- VDDIO2 Voltage is less than the selected LVD Voltage. |
False |
- VDDIO2 Voltage is greater than the selected LVD Voltage. |
Enumeration Type Documentation
LVD_TRIP_POINTS
enum LVD_TRIP_POINTS
Contains the Trip Point voltage values for the MVIO driver.
Section: Included Files
LVD_TRIP_POINT_undefined | |
LVD_TRIP_POINT_1p70 | |
LVD_TRIP_POINT_2p20 | |
LVD_TRIP_POINT_2p40 | |
LVD_TRIP_POINT_2p45 | |
LVD_TRIP_POINT_2p65 | |
LVD_TRIP_POINT_2p70 | |
LVD_TRIP_POINT_2p85 | |
LVD_TRIP_POINT_2p90 | |
LVD_TRIP_POINT_3p15 | |
LVD_TRIP_POINT_3p20 | |
LVD_TRIP_POINT_3p70 | |
LVD_TRIP_POINT_3p93 | |
LVD_TRIP_POINT_4p40 | |
LVD_TRIP_POINT_4p76 | |
LVD_TRIP_POINT_4p80 |
4.6.1.5 File Documentation
4.6.1.5.1 source/mvio.c File Reference
#include <xc.h> #include "../../mvio/vddio2.h"
Functions
void VDDIO2_Initialize (void)
Initializes the VDDIO2 module.
void VDDIO2_LVDSet (LVD_TRIP_POINTS trip_point)
Sets the Low Voltage Detection(LVD) Trip Point value.
void VDDIO2_HysteresisEnable (void)
Enables the Hysteresis for Resistor Ladder.
void VDDIO2_HysteresisDisable (void)
Disables the Hysteresis for Resistor Ladder.
bool VDDIO2_LVDStatusGet (void)
Checks VDDIO2 Voltage with respect to the selected LVD Voltage.
bool VDDIO2_IsReady (void)
Checks if VDDIO2 Voltage is within the range.
4.6.1.5.2 source/mvio.h File Reference
#include <stdbool.h>
Functions
void VDDIO2_Initialize (void)
Initializes the VDDIO2 module.
void VDDIO2_LVDSet (LVD_TRIP_POINTS trip_point)
Sets the Low Voltage Detection(LVD) Trip Point value.
void VDDIO2_HysteresisEnable (void)
Enables the Hysteresis for Resistor Ladder.
void VDDIO2_HysteresisDisable (void)
Disables the Hysteresis for Resistor Ladder.
bool VDDIO2_IsReady (void)
Checks if VDDIO2 Voltage is within the range.
bool VDDIO2_LVDStatusGet (void)
Checks VDDIO2 Voltage with respect to the selected LVD Voltage.
Enumerations
enum LVD_TRIP_POINTS { LVD_TRIP_POINT_undefined = 0, LVD_TRIP_POINT_1p70 = 1, LVD_TRIP_POINT_2p20 = 2, LVD_TRIP_POINT_2p40 = 3, LVD_TRIP_POINT_2p45 = 4, LVD_TRIP_POINT_2p65 = 5, LVD_TRIP_POINT_2p70 = 6, LVD_TRIP_POINT_2p85 = 7, LVD_TRIP_POINT_2p90 = 8, LVD_TRIP_POINT_3p15 = 9, LVD_TRIP_POINT_3p20 = 10, LVD_TRIP_POINT_3p70 = 11, LVD_TRIP_POINT_3p93 = 12, LVD_TRIP_POINT_4p40 = 13, LVD_TRIP_POINT_4p76 = 14, LVD_TRIP_POINT_4p80 = 15 }
Contains the Trip Point voltage values for the MVIO driver.