Advertisement

Quick Links

Getting Started with Multi-Voltage I/O (MVIO)

Introduction

Authors: Johan Vaarlid, Microchip Technology Inc.
®
The AVR
DB Family of microcontrollers is equipped with a configurable integrated level shifter. 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 VDDIO2. The rest of
the I/O pins runs on VDD. Both VDD and VDDIO2 have the same voltage range. Consult the Electrical
Characteristics section of the data sheet for the exact voltage range. This eliminates the need of having external level
shifters for communication or control of external components running on a different voltage level. Eliminating external
logic level shifters will, in turn, reduce the BOM and free up PCB real estate.
Figure 1. Multi-Voltage I/O can Completely Replace External Logic Level Converters
Sensor
1.8-5.5V
Sensor
This technical brief describes how the Multi-Voltage I/O feature works on the AVR DB Family of microcontrollers. It
covers the following use cases:
Polling VDDIO2 Status:
Checking if the VDDIO2 voltage is within the acceptable range by reading the Status bit.
Interrupt on VDDIO2 Status:
Make use of the interrupt that occurs when the Status bit changes state.
Measuring VDDIO2:
©
2020 Microchip Technology Inc.
VDD
Microcontroller
GND
VDD
GND
VDD
Logic
Level
Converter
GND
VDDIO2
1.8-5.5V
GND
Technical Brief
TB3287
VDDIO2
Sensor
GND
Sensor
DS90003287A-page 1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TB3287 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Microchip Technology TB3287

  • Page 1: Introduction

    TB3287 Getting Started with Multi-Voltage I/O (MVIO) Introduction Authors: Johan Vaarlid, Microchip Technology Inc. ® The AVR DB Family of microcontrollers is equipped with a configurable integrated level shifter. 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 VDDIO2. The rest of the I/O pins runs on VDD.
  • Page 2 A basic example of MVIO blinking an LED with a forward voltage higher than VDD. Note:  The code examples were developed on AVR128DB48 Curiosity Nano (EV35L43A), and are available on GitHub. Technical Brief DS90003287A-page 2 © 2020 Microchip Technology Inc.
  • Page 3: Table Of Contents

    10. Appendix............................... 19 The Microchip Website..........................22 Product Change Notification Service......................22 Customer Support............................22 Microchip Devices Code Protection Feature....................22 Legal Notice..............................23 Trademarks..............................23 Quality Management System........................24 Worldwide Sales and Service........................25 Technical Brief DS90003287A-page 3 © 2020 Microchip Technology Inc.
  • Page 4: Relevant Devices

    Devices with different Flash memory sizes typically also have different SRAM and EEPROM ® Figure 1-1. AVR DB Family Overview Flash 128 KB AVR128DB28 AVR128DB32 AVR128DB48 AVR128DB64 64 KB AVR64DB28 AVR64DB32 AVR64DB48 AVR64DB64 32 KB AVR32DB28 AVR32DB32 AVR32DB48 Pins Technical Brief DS90003287A-page 4 © 2020 Microchip Technology Inc.
  • Page 5: Overview

    A configuration fuse determines the MVIO supply mode. The loss or gain of power on VDDIO2 is signaled by a status register bit. This status bit has corresponding interrupt and event functionality. A divided-down VDDIO2 voltage is available as input to the ADC. Technical Brief DS90003287A-page 5 © 2020 Microchip Technology Inc.
  • Page 6 TB3287 Overview Figure 2-2. MVIO Block Diagram DDIO2 Voltage Divider ADC Input VDDIO2S VDDIO2F Voltage Edge Detector Monitor (Int Req.) VDDCORE VDDIO2 Enable PORTy[7:0] DDIO Voltage Monitor VDDCORE PORT PORTx[7:0] Technical Brief DS90003287A-page 6 © 2020 Microchip Technology Inc.
  • Page 7: Hardware Configuration

    Any voltage between 1.8V and 5.5V may be applied to VDDIO2, but for the following examples, we will run at 3.3V. Figure 3-1. AVR128DB48 Curiosity Nano MVIO Figure 3-2. Snippet From the AVR128DB48 Curiosity Nano Schematic Supplying Power To VDDIO2 The Multi-Voltage I/O (MVIO) can be configured in one of two supply modes: Technical Brief DS90003287A-page 7 © 2020 Microchip Technology Inc.
  • Page 8 This bit field controls the power supply mode. Value Name Description 0x00 Reserved 0x01 DUAL Device used in a dual supply configuration. 0x02 SINGLE Device used in a single supply configuration. 0x03 Reserved Technical Brief DS90003287A-page 8 © 2020 Microchip Technology Inc.
  • Page 9: Reading The Status Bit

    The VDDIO2 supply voltage is within the acceptable range for operation. The MVIO pin configurations are loaded from the corresponding PORT registers. //Polling the VDDIO2S bit if(MVIO.STATUS & MVIO_VDDIO2S_bm) //Do something if VDDIO2 is within acceptable range. Technical Brief DS90003287A-page 9 © 2020 Microchip Technology Inc.
  • Page 10: Interrupt On Vddio2 Status

    Writing a ‘1’ to this bit will clear the VDDIO2 Interrupt Flag. ISR(MVIO_MVIO_vect) /* The VDDIO2 interrupt has been triggered */ LED0_toggle(); /* Clear the CFD interrupt flag */ MVIO.INTFLAGS |= MVIO_VDDIO2IF_bm; Technical Brief DS90003287A-page 10 © 2020 Microchip Technology Inc.
  • Page 11: Measuring Vddio2

    VDD as reference VREFA External reference from the VREFA pin Reserved /*Select the 1.024V referance for ADC0*/ VREF.ADC0REF = VREF_REFSEL_1V024_gc; Select the VDDIO2DIV10 as input for ADC0 on the positive input pin. Technical Brief DS90003287A-page 11 © 2020 Microchip Technology Inc.
  • Page 12 4 results accumulated ACC8 8 results accumulated ACC16 16 results accumulated ACC32 32 results accumulated ACC64 64 results accumulated ACC128 128 results accumulated /* Enable 16 oversamples*/ ADC0.CTRLB = ADC_SAMPNUM_ACC16_gc; Enable ADC0. Technical Brief DS90003287A-page 12 © 2020 Microchip Technology Inc.
  • Page 13 The result can be read in the Result (ADC0.RES) register. The result must be divided by 16 due to the oversampling. This is easily done by right shifting the value in ADC0.RES 4 bits. The RESRDY interrupt flag will be automatically cleared when ADC0.RES is read. Technical Brief DS90003287A-page 13 © 2020 Microchip Technology Inc.
  • Page 14 This bit field constitutes the low byte of the ADCn.RES register. /*Read the RES register and shift the result 4 bits to compensate for the 16 oversamples*/ uint16_t result = (ADC0.RES>>4); Technical Brief DS90003287A-page 14 © 2020 Microchip Technology Inc.
  • Page 15: Blinking A 3V Led With Vdd At 1.8V

    Both .txt files can be found in the GitHub repository linked in the introduction. Figure 7-1. Curiosity Nano AVR128DB48 - LED Circuit Physical Layout External voltage 3.3V Resistor remains On-board Supply removed as described voltage in HW Configuration regulator Technical Brief DS90003287A-page 15 © 2020 Microchip Technology Inc.
  • Page 16 /*Check if VDDIO2 is within acceptable range*/ if(MVIO.STATUS & MVIO_VDDIO2S_bm) /*Blink LED at PC0 forever*/ while (1) LED_PC0_toggle(); _delay_ms(250); The code for this example is available in the blinking-a-3v0-led-with-vdd-at-1v8 folder in these github repositories Technical Brief DS90003287A-page 16 © 2020 Microchip Technology Inc.
  • Page 17: References

    TB3287 References References AVR128DB48 product page: www.microchip.com/wwwproducts/en/AVR128DB48. AVR128DB48: www.microchip.com/DS40002247. Curiosity Nano AVR128DB48 product page: www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ EV35L43A. AVR128DB48 Curiosity Nano User Guide: www.microchip.com/DS50003037. Curiosity Nano AVR128DB48 Schematics ww1.microchip.com/downloads/en/DeviceDoc/ AVR128DB48_Curiosity_Nano_Schematics.pdf. Technical Brief DS90003287A-page 17 © 2020 Microchip Technology Inc.
  • Page 18: Revision History

    TB3287 Revision History Revision History Doc. Rev. Date Comments 09/2020 Initial document release. Technical Brief DS90003287A-page 18 © 2020 Microchip Technology Inc.
  • Page 19: Appendix

    /* The VDDIO2 interrupt has been triggered */ LED0_toggle(); /* Clear the CFD interrupt flag */ MVIO.INTFLAGS |= MVIO_VDDIO2IF_bm; Example 10-3. Measuring VDDIO2 #define F_CPU 4000000ul /*Initialize ADC0*/ void adc0_init(void) /*Select the 1.024V referance for ADC0*/ VREF.ADC0REF = VREF_REFSEL_1V024_gc; Technical Brief DS90003287A-page 19 © 2020 Microchip Technology Inc.
  • Page 20 LED_PC0_init(void) PORTC.DIRSET = PIN0_bm; void LED_PC0_toggle(void) PORTC.OUTTGL=PIN0_bm; int main(void) LED_PC0_init(); while (1) /*Check if VDDIO2 is within acceptable range*/ if(MVIO.STATUS & MVIO_VDDIO2S_bm) /*Blink LED at PC0 forever*/ while (1) LED_PC0_toggle(); _delay_ms(250); Technical Brief DS90003287A-page 20 © 2020 Microchip Technology Inc.
  • Page 21 TB3287 Appendix Technical Brief DS90003287A-page 21 © 2020 Microchip Technology Inc.
  • Page 22: The Microchip Website

    Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Technical Brief DS90003287A-page 22 © 2020 Microchip Technology Inc.
  • Page 23: Legal Notice

    The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of Microchip Technology Inc. in other countries. GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
  • Page 24: Quality Management System

    TB3287 Quality Management System For information regarding Microchip’s Quality Management Systems, please visit www.microchip.com/quality. Technical Brief DS90003287A-page 24 © 2020 Microchip Technology Inc.
  • Page 25: Worldwide Sales And Service

    New York, NY Tel: 46-31-704-60-40 Tel: 631-435-6000 Sweden - Stockholm San Jose, CA Tel: 46-8-5090-4654 Tel: 408-735-9110 UK - Wokingham Tel: 408-436-4270 Tel: 44-118-921-5800 Canada - Toronto Fax: 44-118-921-5820 Tel: 905-695-1980 Fax: 905-695-2078 Technical Brief DS90003287A-page 25 © 2020 Microchip Technology Inc.

Table of Contents