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.
- 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
- 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
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.
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.
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).
PIC18F16Q20 Pin | Description | Shared Functionality |
---|---|---|
RA2 | User 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).
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.
4.4.1 Cut Straps
- Target Power Strap (J201)
- Power Supply Strap (J200)
- Debugger Pins (J101, J102, J104, J105, J106)
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.
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.
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.
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.
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.
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.
- Cut the POWER strap with a sharp tool.
- Solder a 1x2 100 mil pin-header in the footprint.
- Connect an ammeter to the pin header.
- Write firmware that:
- Tri-states any I/O connected to the on-board debugger.
- Sets the microcontroller in its lowest Power sleep mode.
- Program the firmware into the PIC18F16Q20.
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.