4.6.2 MVIO with I3C and I2C support
Multi-Voltage I/O with I3C and I2C support
4.6.2.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). This variant of the module has additional features to support limited operation in the 0.95V-1.62V range as well for low-voltage I3C and I2C data transfers.
Features
- The MVIO capable I/O pads are powered by VDDIOx power pin(s)
- The MVIO pins have a standard operating voltage range of 1.62V-5.5V. In addition, the MVIO on PIC18F-Q20 devices is customized to support a low-voltage operating range of 0.95V-1.62V for low-voltage Improved Inter-Integrated Circuit (I3C)® and Inter-Integrated Circuit (I2C) data transfers. Standard and Low Voltage operation is determined by the Configuration bits.
- The VDDIOx supply can ramp up and down independently of the VDD supply
- Customizable Buffer Selection for I3C and I2C/Peripheral Pin Select (PPS) modules
- VDDIOx Supply Status bit
- Interrupt for VDDIOx supply voltage
- Analog-to-Digital Converter (ADC) channel for measuring VDDIOx supply voltage
4.6.2.2 Supported Device Families
PIC18F-Q20 |
4.6.2.3 Required header files:
#include "mcc_generated_files/system/mvio.h"
4.6.2.4 Module Documentation
4.6.2.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 mvio_flag_t { VDDIO2, VDDIO3 }
Contains the return codes for the VDDIO Voltage Monitor Ready Status API.
Functions
void MVIO_Initialize (void)
Initializes the MVIO module.
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
void MVIO_VDDIO2CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO2 callback handler.
void MVIO_VDDIO3CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO3 callback handler.
void MVIO_VDDIO2ISR (void)
MVIO VDDIO2 ISR function.
void MVIO_VDDIO3ISR (void)
MVIO VDDIO3 ISR function.
void MVIO_VDDIO2Tasks (void)
Implements the tasks for polled implementations of VDDIO2.
void MVIO_VDDIO3Tasks (void)
Implements the tasks for polled implementations of VDDIO3.
Function Documentation
MVIO_Initialize()
void MVIO_Initialize (void )
Initializes the MVIO module.
None. |
None. |
MVIO_IsVDDIOReady()
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
in | flag |
- Supply voltage source |
True |
- The VDDIOx supply voltage is within the acceptable range for operation |
False |
- The VDDIOx supply voltage is below the acceptable range for operation |
MVIO_VDDIO2CallbackRegister()
void MVIO_VDDIO2CallbackRegister (void(*)(void) handler)
Setter function for the MVIO VDDIO2 callback handler.
in | CallbackHandler |
- Pointer to a function called when VDDIO2 supply voltage loss/gain occurs |
None. |
MVIO_VDDIO2ISR()
void MVIO_VDDIO2ISR (void )
MVIO VDDIO2 ISR function.
None. |
None. |
MVIO_VDDIO2Tasks()
void MVIO_VDDIO2Tasks (void )
Implements the tasks for polled implementations of VDDIO2.
None. |
None. |
MVIO_VDDIO3CallbackRegister()
void MVIO_VDDIO3CallbackRegister (void(*)(void) handler)
Setter function for the MVIO VDDIO3 callback handler.
in | CallbackHandler |
- Pointer to a function called when VDDIO3 supply voltage loss/gain occurs |
None. |
MVIO_VDDIO3ISR()
void MVIO_VDDIO3ISR (void )
MVIO VDDIO3 ISR function.
None. |
None. |
MVIO_VDDIO3Tasks()
void MVIO_VDDIO3Tasks (void )
Implements the tasks for polled implementations of VDDIO3.
None. |
None. |
Enumeration Type Documentation
mvio_flag_t
enum mvio_flag_t
Contains the return codes for the VDDIO Voltage Monitor Ready Status API.
VDDIO2 |
VDDIO3 |
4.6.2.5 File Documentation
4.6.2.5.1 source/mvio_interrupt.c File Reference
#include <xc.h> #include "../mvio.h"
Functions
void MVIO_Initialize (void)
Initializes the MVIO module.
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
void MVIO_VDDIO2CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO2 callback handler.
void MVIO_VDDIO3CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO3 callback handler.
void __interrupt (irq(VDDIO2), base(8))
void __interrupt (irq(VDDIO3), base(8))
Variables
static void(* MVIO_VDDIO2Handler )(void) = NULL
static void(* MVIO_VDDIO3Handler )(void) = NULL
Function Documentation
__interrupt()[1/2]
void __interrupt (irq(VDDIO2) , base(8) )
__interrupt()[2/2]
void __interrupt (irq(VDDIO3) , base(8) )
Variable Documentation
MVIO_VDDIO2Handler
void(* MVIO_VDDIO2Handler) (void) = NULL[static]
MVIO_VDDIO3Handler
void(* MVIO_VDDIO3Handler) (void) = NULL[static]
4.6.2.5.2 source/mvio_interrupt.h File Reference
#include <stdbool.h> #include <stdint.h>
Functions
void MVIO_Initialize (void)
Initializes the MVIO module.
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
void MVIO_VDDIO2CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO2 callback handler.
void MVIO_VDDIO3CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO3 callback handler.
void MVIO_VDDIO2ISR (void)
MVIO VDDIO2 ISR function.
void MVIO_VDDIO3ISR (void)
MVIO VDDIO3 ISR function.
Enumerations
enum mvio_flag_t { VDDIO2, VDDIO3 }
Contains the return codes for the VDDIO Voltage Monitor Ready Status API.
4.6.2.5.3 source/mvio_polling.c File Reference
#include <xc.h> #include "../mvio.h"
Functions
void MVIO_Initialize (void)
Initializes the MVIO module.
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
void MVIO_VDDIO2CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO2 callback handler.
void MVIO_VDDIO3CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO3 callback handler.
void MVIO_VDDIO2Tasks (void)
Implements the tasks for polled implementations of VDDIO2.
void MVIO_VDDIO3Tasks (void)
Implements the tasks for polled implementations of VDDIO3.
Variables
static void(* MVIO_VDDIO2Handler )(void) = NULL
static void(* MVIO_VDDIO3Handler )(void) = NULL
Variable Documentation
MVIO_VDDIO2Handler
void(* MVIO_VDDIO2Handler) (void) = NULL[static]
MVIO_VDDIO3Handler
void(* MVIO_VDDIO3Handler) (void) = NULL[static]
4.6.2.5.4 source/mvio_polling.h File Reference
#include <stdbool.h> #include <stdint.h>
Functions
void MVIO_Initialize (void)
Initializes the MVIO module.
bool MVIO_IsVDDIOReady (mvio_flag_t flag)
Checks if the VDDIOx monitor voltage is within the specified range.
void MVIO_VDDIO2CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO2 callback handler.
void MVIO_VDDIO3CallbackRegister (void(*handler)(void))
Setter function for the MVIO VDDIO3 callback handler.
void MVIO_VDDIO2Tasks (void)
Implements the tasks for polled implementations of VDDIO2.
void MVIO_VDDIO3Tasks (void)
Implements the tasks for polled implementations of VDDIO3.