Simplify Dual Voltage Domain Systems Using the MVIO Peripheral on Microchip’s AVR® DB MCU
Simplify and reduce the BOM of designs with two digital voltage-domains using the MVIO on AVR® DB.
See Figure 1. 1 kHz Sine Wave Output from the PAM Generator
One of the problems that my engineering class ran into during college was interfacing a microcontroller (MCU) with a motor encoder that had an SPI interface. Despite our best efforts, almost (if not every) team in the class experienced the same problem: the encoder just would not talk to the MCU. Towards the end of the semester, we figured out the problem. The encoder and the MCU operated at different voltage levels, which prevented the two from correctly communicating.
Just like we experienced in my class, mismatching voltage domains can trigger many issues, from incorrect transmission and reception of data to causing damage to other devices in the system, usually in the lower voltage area. Traditionally, the solution to interface across two different voltage domains is to use a level-shifter, a special digital circuit that translates the digital signal from one domain to another. However, this adds extra components to the bill of materials (BOM), increasing costs and crowding the design area.
So, how can you interface across two different voltage domains without adding to your BOM?
To solve this problem without the need for external components, Microchip developed the new Multi-Voltage I/O (MVIO) peripheral for the AVR® DB MCU family, completely removing the need for an external level-shifter. The MVIO allows a single port on the AVR DB to operate in a different voltage domain than the rest of the MCU. For instance, a 5V MCU can interface with a 3.3V sensor, or a 3.3V MCU can communicate with a 5V device. MVIO does not affect the digital functionality of the port, making standard I/O operations and digital peripherals still possible.
(Note: Analog functions are not available on the MVIO.)
In the event of a loss-of-power on the MCU or on the MVIO, the MVIO is tri-stated. If the MVIO supply loses power, then regains it, the I/O will automatically return to its configurations. However, if the MCU loses power, the MVIO port will have to be reinitialized. To detect changes in the MVIO state, a register bit, an interrupt and an event-system output are available. The power supply to the MVIO port can also be measured by the ADC using an internal 10x divider network built in.
To demonstrate the flexibility of the AVR DB MCU’s MVIO peripheral, let’s look at how the MVIO port can be used to create Pulse-Amplitude Modulated (PAM) output signals.
Demonstration: Using the MVIO Port for Pulse Amplitude Modulated (PAM) Digital Signals
PAM is a type of mixed-signal output where a digital signal is mixed into an analog signal. Some types of PAM are used for carrying extra information by using varying voltage output levels, however the AVR DB isn’t designed to interface with these types of devices.
The PAM generator is a visual demonstration of the AVR DB’s MVIO. In most applications, the MVIO is kept at a static level. This unusual demonstration instead uses the DAC (with an operational amplifier buffer) to create an arbitrary waveform that is used to vary the MVIO’s operating levels. The digital output on the MVIO is a 250 kHz PWM waveform that shifts in amplitude depending on the MVIO’s supply. The 1 kHz sine-wave output of the PAM generator is included in figure 1. To see the full demo or to try it yourself, access the source code and documentation here.
Get Started
The MVIO peripheral is a simple, yet incredibly useful peripheral that greatly simplifies the process of interfacing the MCU with a second voltage domain. This can remove an external level-shifter (and its associated components) from the BOM, reducing costs and the area required to implement the design. To find out more about the AVR DB family and how it can help simplify your designs, visit our website here. For more information about the MVIO peripheral, check out the following videos: