- PIC MCUs
- AVR MCUs
- 8051 MCUs
- Angular Timer
- Configurable Logic Cell
- Cyclic Redundancy Check
- Complementary Waveform Generator
- Direct Memory Access
- Event System
- High Endurance Flash
- Math Accelerator
- Numerically Controlled Oscillator
- Peripheral Pin Select
- Pulse-Width Modulation
- Temperature Indicator
- Timer Peripheral
- Windowed Watch Dog Timer
- Intelligent Analog
- Input and Output Features
- Core Independent
- Functional Safety
- PIC Hardware
- PIC Software
- AVR Hardware
- AVR Software
8-bit Development Tools
Input and Output Features
As the most fundamental elements of every microcontroller (MCU), the Input/Output (I/O) pins serve as the device’s links to the outside world. Microchip PIC® and AVR® devices are designed to support industry-leading I/O controls and to provide innovative features that can take your products to the next level. Most of the features described below are standard on modern PIC and AVR MCUs.
Standard I/O Features
Tristate control sets whether an I/O pin is a low-impedance output or a high-impedance, also called tri-stated, input. A pin that is tri-stated is an input that effectively turns off the output driver, making the pin an input. The ability to switch between the two modes of operation gives you choices in pin assignments.
Analog or Digital Input
When using the I/O on an MCU, it is important to set whether an input is analog or digital. A digital input on a pin set for analog functions may cause unexpected or incorrect behavior due to the way the MCU tries to read the value. Likewise, reading an analog value on a pin set up for digital logic may add noise and error to the signal.
Open-Drain Output (PIC MCUs Only)
Open-drain logic is a type of active-low digital logic that supports multiple devices asserting a shared line at the same time. This type of logic is commonly used to indicate an interrupt or that data is ready. PIC MCUs have built-in open-drain output support that eliminates the need for an external transistor to enable denser system integration.
Figure 1 - Open Drain Output
The Interrupt-on-Change (IOC) function on the I/O pins generates an interrupt based on a change in logic level. IOC is useful as a trigger to read data from a sensor or to indicate that a button has been pressed by the user.
Normally, switches and buttons have a pull-up resistor that ensures that when the button is not pressed (in the open state), the digital level of the I/O is defined to be at a logic 1. A weak (very-high-valued) pull-up resistor inside the MCU can be used in the same manner.
Figure 2 - Weak Pull-ups
Our MCUs are available with advanced I/O features to improve their usability in a variety of applications. Advanced features vary by device. Please check the device family data sheet for more information.
Input Threshold Control
Ordinarily, an MCU’s operating voltage determines the threshold levels required for proper reception of a digital signal. However, input threshold controls allow an MCU that is running at a higher voltage to correctly receive a lower-voltage digital signal.
Slew Rate ControlThe slew rate control registers offer the ability to increase the rise and fall time of a logic signal. Slowing the speed of the edges can reduce the electromagnetic interference generated by the sudden change in output.
Figure 3 – Rise and Fall Time in Waveforms
High-Current I/O (PIC MCUs Only)
High-current I/O allows the MCU’s I/O pins to sink or source up to 100 mA of current. Generally, the limit on MCUs is approximately 20 mA.
Peripheral Pin Select (PIC MCUs Only)
Peripheral Pin Select (PPS) is an advanced feature available in many PIC MCUs that allows for rerouting of digital peripheral I/O from a default location to a developer-selected location on the device. PPS can be used to simplify PCB layouts or to resolve signal connection issues. The PPS registers can be locked in place, preventing unwanted changes to the registers.
PORTMUX (AVR MCUs Only)
Available on AVR devices, the PORTMUX feature allows an alternative pin assignment for many of the on-board peripherals, similar to PPS operates on PIC devices.
Multi-Voltage I/O (AVR MCUs Only)Multi-Voltage I/O (MVIO) allows the MCU to interface with digital inputs or outputs at a different operating voltage than the device. MVIO is designed to operate independently of both the core and auxiliary power supplies. If either supply loses power, then the MVIO pins are tri-stated.
Reset (AVR MCUs Only)
AVR devices feature an active-low RESET line which, when held low, will reset the MCU. An internal pull-up resistor is built into the MCU, eliminating the need for an external pull-up resistor in most cases. Please consult the device data sheet for more information on RESET.
MCLR (PIC MCUs Only)
PIC devices utilize an active-low master clear (MCLR) line to reset the MCU. MCLR is also required for programming and debugging. The MCLR line must have an external pull-up resistor to VDD. Please consult the device data sheet for more information on MCLR.
I2C Pins (PIC MCUs Only)
Some of the I/O pins on PIC devices are special versions of standard I/O that have improved I2C or 2-wire bus performance. The enhancements on these pins include faster slew rates, stronger internal pull-ups and selectable thresholds for standardized I2C and SMBus interfaces.