4 Hardware Implementation

LED, Mechanical Switch, Power Supply

4.1 Multi-Voltage I/O

The PIC18F16Q20 Curiosity Nano MCU supports Multi-Voltage I/O (MVIO), and the PIC18F16Q20 features two MVIO domains powered by VDDIO2 and VDDIO3. The pins RC0 and RC1 are powered through VDDIO2, and the pins RB5 and RB6 are powered through VDDIO3. The I/O pins connected to the MVIO feature are powered only by the additional VDDIOx pins. If no power is supplied to these power pins, the associated I/O pins will not function.

By default VDDIO2, is supplied by VCC_TARGET, and VDDIO3 is supplied by its own 1.2V regulator, MCP1711 (U101). VDDIO2 and VDDIO3 can be disconnected from their default power connections by removing the 0Ω resistors R105 and/or R106. After the removal, an external power supply can power the MVIO pins through the associated 1x2-100mil footprints. The block diagram below details connections to the different power domains.
Important: When the I3C module is enabled, the MVIO supply voltage on the corresponding VDDIOx power pin must not exceed 3.63V. To avoid accidentally damaging the PIC18F16Q20, the target regulator is limited to 1.8–3.6V.
Figure 4-1. MVIO Block Diagram
Warning: Supplying a voltage greater than 3.6V to any VDDIOx power pin while I3C is enabled may damage the PIC18F16Q20.
Figure 4-2. VDDIO2 and VDDIO3 Connections
Warning: Before any hardware modifications, make sure the board is disconnected from the USB or external power.
Disconnecting VDDIO2:
  • Disconnect VDDIO2 from VCC_TARGET by removing resistor R106
  • Connect a new power supply to VDDIO2 and ground at J108
  • J108 does not have reverse polarity protection. Make sure to match the polarity between the power supply and J108. Positive-polarity to J108-pin 1 and negative-polarity to J108-pin 2
Figure 4-2 shows the resistor R106, VDDIO2 and J108.
Disconnecting VDDIO3:
  • Disconnect VDDIO3 from VCC_VDDIO3_P1V2 by removing resistor R105
  • Connect a new power supply to VDDIO3 and ground at J107
  • J107 does not have reverse polarity protection. Make sure to match the polarity between the power supply and J107. Positive-polarity to J107-pin 1 and negative-polarity to J107-pin 2
Figure 4-2 shows the resistor R105, VDDIO3 and J107.
Warning: Applying an external voltage to VDDIO2 or VDDIO3 without removing the resistor(s) may cause permanent damage to the board!
Warning: J107 and J108 do not have reverse polarity protection. Applying voltage to the wrong pin may cause permanent damage to the board.

4.1.1 I3C Considerations

While the PIC18F16Q20 supports operating voltages from 1.8-5.5V the PIC18F16Q20 Curiosity Nano is limited in its target voltage to 1.8–3.6V. The PIC18F16Q20 Curiosity Nano target voltage limit is set to accommodate the low voltage I3C capabilities of the PIC18F16Q20.

As the maximum voltage for the VDDIOx power domains while I3C is enabled is 3.63V, and VDDIO2 is by default connected to VCC_TARGET, the PIC18F16Q20 Curiosity Nano is limited to a maximum target voltage of 3.6V.

The PIC18F16Q20 supports limited operation in the 0.95-1.62V range for low voltage I3C and I2C. Any other pin functionality is unusable while in this low voltage range. VDDIO3 is supplied with a fixed 1.2V, which means that the pins RB5 and RB6 are limited to I3C or I2C functionality. Hardware modification is required to use these pins for any other purpose.
Tip: For more information on low voltage and the MVIO feature see the PIC18F16Q20 Data Sheet.

4.2 LED

One yellow user LED is available on the PIC18F16Q20 Curiosity Nano board. Either GPIO or PWM can control it. Driving the connected I/O line to GND can also activate the LED.

Figure 4-3 4-4. PIC18F16Q20 Curiosity Nano LED0 Block Diagram
Table 4-1 4-2. LED Connection
PIC18F16Q20 Pin Function Shared Functionality
RC7 Yellow LED0 Edge connector

4.3 Mechanical Switch

The PIC18F16Q20 Curiosity Nano board has one mechanical switch - a generic user-configurable switch. Pressing it will connect the I/O pin to ground (GND).

Figure 4-3 4-4. PIC18F16Q20 Curiosity Nano SW0 Block Diagram
Tip: There is no externally connected pull-up resistor on the switch. Enable the internal pull-up resistor on Pin RA2 to use it.
Table 4-1 4-2. Mechanical Switch Connection
PIC18F16Q20 PinDescriptionShared Functionality
RA2User switch (SW0)Edge connector

4.4 Power Supply

The USB port powers the board. The input power is delayed to allow USB cable oscillations to die out. The delay is about 1 ms. VBUS is further limited to a 2 V/ms slew rate and is current limited to 500 mA by U202 (MIC2008).

Tip: Changing the values for C206 and R211 can alter the slew rate and current limit set by U202.

The power supply consists of two LDO regulators, one to generate 3.3V for the on-board debugger and an adjustable LDO regulator for the target PIC18F16Q20 microcontroller and its peripherals. The voltage from a USB connector can vary between 4.4V and 5.25V (according to the USB specification) and will limit the maximum voltage supplied to the target. The figure below shows the entire power supply system on the PIC18F16Q20 Curiosity Nano.

Figure 4-5 4-7. Power Supply Block Diagram

4.4.1 Cut Straps

All power and debugging signals are connected to the target by default. The following cut straps are available to take measurements or separate the debugger from the target:
  • Target Power Strap (J201)
  • Power Supply Strap (J200)
  • Debugger Pins (J101, J102, J104, J105, J106)
Figure 4-6. Common Curiosity Nano Cut Straps

4.4.2 Target Regulator

The target voltage regulator is a MIC5353 variable output LDO. The on-board debugger can adjust the voltage output supplied to the board target section by manipulating the MIC5353’s feedback voltage. The hardware implementation is limited to an approximate voltage range from 1.7V to 5.1V. Additional output voltage limits are configured in the debugger firmware to ensure that the output voltage never exceeds the hardware limits of the PIC18F16Q20 microcontroller. The voltage limits configured in the on-board debugger on PIC18F16Q20 Curiosity Nano are 1.8–3.6V.

Info: The factory default target voltage is 3.3V. It can be changed through the MPLAB® X IDE project properties. Any change to the target voltage is persistent, even after a power toggle. The resolution is less than 5 mV but may be limited to 10 mV by the adjustment program.
Info: The voltage settings setup in MPLAB® X IDE is not applied immediately to the board. The new voltage setting is applied to the board when accessing the debugger, like pushing the Refresh Debug Tool Status button in the project dashboard tab or programming/reading program memory.
Info: There is an easy option to adjust the target voltage with a drag-and-drop command text file to the board, which supports a set of commonly used target voltages. See section 3.5.2 Special Commands for further details.

MIC5353 supports a maximum current load of 500 mA. It is an LDO regulator in a small package placed on a small printed circuit board (PCB) and can reach the thermal shutdown condition at lower loads than 500 mA. The maximum current load depends on the input voltage, the selected output voltage, and the ambient temperature. The figure below shows the safe operating area for the regulator, with an input voltage of 5.1V and an ambient temperature of 23°C.

Figure 4-5 4-7. Target Regulator Safe Operation Area

The voltage output of the target regulator is continuously monitored (measured) by the on-board debugger. An error condition will be flagged - and the target voltage regulator will be switched off, detecting and handling any short-circuit conditions if it is more than 100 mV over/under the set device voltage. It will also detect and handle if an external voltage, which causes VCC_TARGET to move outside the voltage setting monitoring window of ±100 mV, is suddenly applied to the VTG pin without setting the VOFF pin low.

Info: The on-board debugger has a monitoring window of VCC_TARGET±100 mV, and the status LED will blink rapidly if the external voltage is under this limit. The on-board debugger status LED will continue to shine if the external voltage surpasses this limit. When removing the external voltage, the status LED will start blinking rapidly until the on-board debugger detects the new situation and turns the target voltage regulator back on.

4.4.3 External Supply

Instead of the on-board target regulator, an external voltage can power the PIC18F16Q20 Curiosity Nano. When shorting the Voltage Off (VOFF) pin to the ground (GND) pin, the on-board debugger firmware disables the target regulator, and it is safe to apply an external voltage to the VTG pin.

It is also safe to apply an external voltage to the VTG pin when no USB cable is plugged into the DEBUG connector on the board.

The VOFF pin can be tied low/let go at any time, which will be detected by a pin-change interrupt to the on-board debugger, which controls the target voltage regulator accordingly.

Warning: Applying an external voltage to the VTG pin without shorting VOFF to GND may cause permanent damage to the board.
Warning: Do not apply any voltage to the VOFF pin. Let the pin float to enable the power supply.
Warning: The absolute maximum external voltage is 5.5V for the on-board level shifters, and the standard operating condition of the PIC18F16Q20 is 1.8–3.6V. Applying a higher voltage may cause permanent damage to the board.
Info: The on-board debugger monitors the voltage supplied to the board. If VOFF is not pulled low and external power is supplied that differs by more than ±100 mV from the target regulator setting, the on-board debugger will shut off the target regulator and begin blinking the status LED rapidly, indicating an error condition. Once the input voltage returns to within ±100 mV of the target regulator setting, the on-board debugger will switch on the target regulator and stop blinking the status LED.

Programming, debugging, and data streaming are still possible with an external power supply. The USB cable will power the debugger and signal level shifters. Both regulators, the debugger, and the level shifters are powered down when the USB cable is removed.

Info: In addition to the power consumed by the PIC18F16Q20 and its peripherals, approximately 100 µA will be drawn from any external power source to power the on-board level shifters and voltage monitor circuitry when plugging a USB cable into the DEBUG connector on the board. When a USB cable is unplugged, some current is used to supply the level shifter’s voltage pins, having a worst-case current consumption of approximately 5 µA. Typical values may be as low as 100 nA.

4.4.4 Power Supply Exceptions

This section sums up most exceptions that can occur with the power supply.

Target Voltage Shuts Down

Not reaching the target voltage setting can happen if the target section draws too much current at a given voltage and causes the thermal shutdown safety feature of the MIC5353 regulator to kick in. To avoid this, reduce the current load of the target section.

Target Voltage Setting is Not Reached

The USB input voltage (specified to be 4.4-5.25V) limits the maximum output voltage of the MIC5353 regulator at a given voltage setting and current consumption. If a higher output voltage is needed, use a USB power source with a higher input voltage or use an external voltage supply on the VTG pin.

Target Voltage is Different From Setting

An externally applied voltage to the VTG pin without setting the VOFF pin low can cause this. If the target voltage varies more than 100 mV over/under the voltage setting, the on-board debugger will detect it, and the internal voltage regulator will shut down. To fix this issue, remove the applied voltage from the VTG pin, and the on-board debugger will enable the on-board voltage regulator when the new condition is detected. Note that the PS LED will blink rapidly if the target voltage is below 100 mV of the setting but will ordinarily turn on when higher than 100 mV above it.

No, or Very Low Target Voltage and PS LED is Blinking Rapidly

A full or partial short circuit can cause this and is a particular case of the issue above. Remove it, and the on-board debugger will re-enable the on-board target voltage regulator.

No Target Voltage and PS LED is Lit 1

This situation occurs if the target voltage is set to 0.0V. Set the target voltage to a value within the specified voltage range for the target device to fix this.

No Target Voltage and PS LED is Lit 2

This situation can be the issue when cutting power jumper J200 and/or J201 and setting the target voltage regulator to a value within the specified voltage range for the target device. To fix this, solder a wire/bridge between the pads for J200/J201 or add a jumper on J201 if a pin-header is mounted.

VBUS Output Voltage is Low or Not Present

If the VBUS output voltage is low or missing, the reason is probably a high-current drain on VBUS, and the current limit set by U202 (MIC2008) is tripped and has cut off VBUS completely. Reduce the current consumption on the VBUS pin to fix this issue.

4.4.5 Low-Power Measurement

Power to the PIC18F16Q20 comes from the on-board power supply and VTG pin through a 100 mil pin-header marked with “POWER” in silkscreen (J201). To measure the power consumption of the PIC18F16Q20 and other peripherals connected to the board, cut the Target Power strap (J201) on the bottom side and connect an ammeter across it.

Tip: A 100-mil pin-header can be soldered into the Target Power strap (J201) footprint for a simple connection of an ammeter. Place a jumper cap on the pin-header once the ammeter is no longer needed.
To measure the lowest possible power consumption, follow these steps:
  1. Cut the POWER strap with a sharp tool.
  2. Solder a 1x2 100 mil pin-header in the footprint.
  3. Connect an ammeter to the pin header.
  4. Write firmware that:
    1. Tri-states any I/O connected to the on-board debugger.
    2. Sets the microcontroller in its lowest Power sleep mode.
  5. Program the firmware into the PIC18F16Q20.
Info: The on-board level shifters will draw a small amount of current even when unused. Each level shifter has a maximum of 2 μA leakage current. Therefore, the worst-case maximum current draw for the five on-board level shifters is 10 μA. Prevent leakage current through an I/O pin connected to a level shifter by keeping the I/O pin tri-stated. All I/Os connected to the on-board debugger are listed in 3.2 On-Board Debugger Connections. The on-board level shifters can be completely disconnected, preventing leakage, as described in 6.6 Disconnecting the On-Board Debugger.

4.4.6 VBUS Output Pin

PIC18F16Q20 Curiosity Nano has a VBUS output pin that can be used to power external components that need a 5V supply. The VBUS output pin is protected by the same start-up delay with a slew rate and current limiter as the rest of the power supply. A side effect is a voltage drop on the VBUS output with higher current loads. The chart below shows the VBUS output voltage versus the current load of the VBUS output.

Figure 4-8. VBUS Output Voltage vs. Current